Unverified Commit 78cff5dc authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

x{dm,dpyinfo,rdb}: refactor & move to pkgs/by-name from xorg namespace (#470232)

parents 7dac4f96 077d6f4d
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;
  };
})
+75 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitLab,
  meson,
  pkg-config,
  ninja,
  libx11,
  libxcb,
  libxext,
  libxi,
  libxtst,
  libxcomposite,
  libxinerama,
  libxpresent,
  libxrandr,
  libxrender,
  libxxf86dga,
  libxxf86vm,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xdpyinfo";
  version = "1.4.0";

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

  strictDeps = true;

  nativeBuildInputs = [
    meson
    pkg-config
    ninja
  ];

  buildInputs = [
    libx11
    libxcb
    libxext
    libxi
    libxtst
    # optional deps
    libxcomposite
    libxinerama
    libxpresent
    libxrandr
    libxrender
    libxxf86dga
    libxxf86vm
  ];

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

  meta = {
    description = "display information utility for X";
    longDescription = ''
      xdpyinfo is a utility for displaying information about an X server.
      It is used to examine the capabilities of a server, the predefined
      values for various parameters used in communicating between clients
      and the server, and the different types of screens, visuals, and X11
      protocol extensions that are available.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/app/xdpyinfo";
    license = lib.licenses.mitOpenGroup;
    mainProgram = "xdpyinfo";
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
})
+58 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitLab,
  autoreconfHook,
  pkg-config,
  util-macros,
  xorgproto,
  libx11,
  libxmu,
  mcpp,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xrdb";
  version = "1.2.2";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    group = "xorg";
    owner = "app";
    repo = "xrdb";
    tag = "xrdb-${finalAttrs.version}";
    hash = "sha256-XCi/E6tVaLYGRsMWJalCl1J8VIT4xV6KFuo+K//LQGY=";
  };

  strictDeps = true;

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

  buildInputs = [
    xorgproto
    libx11
    libxmu
  ];

  # replace gcc with mcpp as preprocessor to reduce the closure size
  # see https://github.com/NixOS/nixpkgs/issues/9480
  configureFlags = [ "--with-cpp=${lib.getExe mcpp}" ];

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

  meta = {
    description = "X resource database utility";
    homepage = "https://gitlab.freedesktop.org/xorg/app/xrdb";
    license = with lib.licenses; [
      hpndDec
      mitOpenGroup
    ];
    mainProgram = "xrdb";
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
})
+6 −156
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@
  xconsole,
  xcursorgen,
  xcursor-themes,
  xdm,
  xdpyinfo,
  xdriinfo,
  xev,
  xeyes,
@@ -145,6 +147,7 @@
  xorg-sgml-doctools,
  xprop,
  xrandr,
  xrdb,
  xrefresh,
  xset,
  xsetroot,
@@ -196,6 +199,8 @@ self: with self; {
    xcompmgr
    xconsole
    xcursorgen
    xdm
    xdpyinfo
    xdriinfo
    xev
    xeyes
@@ -216,6 +221,7 @@ self: with self; {
    xorgproto
    xprop
    xrandr
    xrdb
    xrefresh
    xset
    xsetroot
@@ -406,124 +412,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 (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libdmx,
      libX11,
      libxcb,
      libXcomposite,
      libXext,
      libXi,
      libXinerama,
      xorgproto,
      libXrender,
      libXtst,
      libXxf86dga,
      libXxf86misc,
      libXxf86vm,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xdpyinfo";
      version = "1.3.4";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xdpyinfo-1.3.4.tar.xz";
        sha256 = "0aw2yhx4ys22231yihkzhnw9jsyzksl4yyf3sx0689npvf0sbbd8";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [ pkg-config ];
      buildInputs = [
        libdmx
        libX11
        libxcb
        libXcomposite
        libXext
        libXi
        libXinerama
        xorgproto
        libXrender
        libXtst
        libXxf86dga
        libXxf86misc
        libXxf86vm
      ];
      passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
      meta = {
        pkgConfigModules = [ ];
        platforms = lib.platforms.unix;
      };
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xf86inputevdev = callPackage (
    {
@@ -2698,44 +2586,6 @@ self: with self; {
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xrdb = callPackage (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libX11,
      libXmu,
      xorgproto,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xrdb";
      version = "1.2.2";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xrdb-1.2.2.tar.xz";
        sha256 = "1x1ka0zbcw66a06jvsy92bvnsj9vxbvnq1hbn1az4f0v4fmzrx9i";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [ pkg-config ];
      buildInputs = [
        libX11
        libXmu
        xorgproto
      ];
      passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
      meta = {
        pkgConfigModules = [ ];
        platforms = lib.platforms.unix;
      };
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xtrap = callPackage (
    {
+6 −0
Original line number Diff line number Diff line
@@ -452,6 +452,8 @@ print OUT <<EOF;
  xconsole,
  xcursorgen,
  xcursor-themes,
  xdm,
  xdpyinfo,
  xdriinfo,
  xev,
  xeyes,
@@ -476,6 +478,7 @@ print OUT <<EOF;
  xorg-sgml-doctools,
  xprop,
  xrandr,
  xrdb,
  xrefresh,
  xset,
  xsetroot,
@@ -527,6 +530,8 @@ self: with self; {
    xcompmgr
    xconsole
    xcursorgen
    xdm
    xdpyinfo
    xdriinfo
    xev
    xeyes
@@ -547,6 +552,7 @@ self: with self; {
    xorgproto
    xprop
    xrandr
    xrdb
    xrefresh
    xset
    xsetroot
Loading