Unverified Commit 6bd877d2 authored by quantenzitrone's avatar quantenzitrone
Browse files

xdm: refactor & move to pkgs/by-name from xorg namespace

relevant changes:
- use gitlab source instead of release tarball
parent bbcc0345
Loading
Loading
Loading
Loading
+86 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitLab,
  pkg-config,
  util-macros,
  autoreconfHook,
  wrapWithXFileSearchPathHook,
  libx11,
  libxau,
  libxaw,
  libxcrypt,
  libxdmcp,
  libxext,
  libxft,
  libxinerama,
  libxmu,
  libxpm,
  libxrender,
  libxt,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xdm";
  version = "1.1.17";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "xorg";
    repo = "app/xdm";
    tag = "xdm-${finalAttrs.version}";
    hash = "sha256-PhMctvL+Vp9uNmTtowMHzkoekieVCgNZCfUZ1XpjpyY=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    pkg-config
    util-macros
    autoreconfHook
    wrapWithXFileSearchPathHook
  ];

  buildInputs = [
    libx11
    libxau
    libxaw
    libxcrypt
    libxdmcp
    libxext
    libxft
    libxinerama
    libxmu
    libxpm
    libxrender
    libxt
  ];

  configureFlags = [
    "ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp"
  ]
  # checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
  ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
    "ac_cv_file__dev_urandom=true"
    "ac_cv_file__dev_random=true"
  ];

  installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ];

  passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=xdm-(.*)" ]; };

  meta = {
    description = "X Display Manager with support for XDMCP, host chooser";
    homepage = "https://gitlab.freedesktop.org/xorg/app/xdm";
    license = with lib.licenses; [
      mit
      mitOpenGroup
      x11
      bsd3ClauseTso
      bsd2
    ];
    mainProgram = "xdm";
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
})
+2 −60
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@
  xconsole,
  xcursorgen,
  xcursor-themes,
  xdm,
  xdriinfo,
  xev,
  xeyes,
@@ -196,6 +197,7 @@ self: with self; {
    xcompmgr
    xconsole
    xcursorgen
    xdm
    xdriinfo
    xev
    xeyes
@@ -406,66 +408,6 @@ self: with self; {
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xdm = callPackage (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libX11,
      libXau,
      libXaw,
      libXdmcp,
      libXext,
      libXft,
      libXinerama,
      libXmu,
      libXpm,
      xorgproto,
      libXrender,
      libXt,
      wrapWithXFileSearchPathHook,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xdm";
      version = "1.1.17";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xdm-1.1.17.tar.xz";
        sha256 = "0spbxjxxrnfxf8gqncd7bry3z7dvr74ba987cx9iq0qsj7qax54l";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [
        pkg-config
        wrapWithXFileSearchPathHook
      ];
      buildInputs = [
        libX11
        libXau
        libXaw
        libXdmcp
        libXext
        libXft
        libXinerama
        libXmu
        libXpm
        xorgproto
        libXrender
        libXt
      ];
      passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
      meta = {
        pkgConfigModules = [ ];
        platforms = lib.platforms.unix;
      };
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xdpyinfo = callPackage (
    {
+2 −0
Original line number Diff line number Diff line
@@ -452,6 +452,7 @@ print OUT <<EOF;
  xconsole,
  xcursorgen,
  xcursor-themes,
  xdm,
  xdriinfo,
  xev,
  xeyes,
@@ -527,6 +528,7 @@ self: with self; {
    xcompmgr
    xconsole
    xcursorgen
    xdm
    xdriinfo
    xev
    xeyes
+0 −19
Original line number Diff line number Diff line
@@ -128,25 +128,6 @@ self: super:
    };
  });

  xdm = super.xdm.overrideAttrs (attrs: {
    buildInputs = attrs.buildInputs ++ [ libxcrypt ];
    configureFlags =
      attrs.configureFlags or [ ]
      ++ [
        "ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp"
      ]
      ++
        lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
          # checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
          [
            "ac_cv_file__dev_urandom=true"
            "ac_cv_file__dev_random=true"
          ];
    meta = attrs.meta // {
      mainProgram = "xdm";
    };
  });

  xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
    outputs = [
      "out"
+0 −1
Original line number Diff line number Diff line
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
mirror://xorg/individual/app/xdm-1.1.17.tar.xz
mirror://xorg/individual/app/xdpyinfo-1.3.4.tar.xz
mirror://xorg/individual/app/xfd-1.1.4.tar.xz
mirror://xorg/individual/app/xfs-1.2.2.tar.xz