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

x{clock,fd,fs}: refactor & move to pkgs/by-name from xorg namespace (#470447)

parents 2b913df3 2057140a
Loading
Loading
Loading
Loading
+83 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitLab,
  fetchpatch,
  meson,
  ninja,
  pkg-config,
  wrapWithXFileSearchPathHook,
  libx11,
  libxaw,
  libxft,
  libxkbfile,
  libxmu,
  libxrender,
  libxt,
  xorgproto,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xclock";
  version = "1.1.1";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    group = "xorg";
    owner = "app";
    repo = "xclock";
    tag = "xclock-${finalAttrs.version}";
    hash = "sha256-ZgUb+iVO45Az/C+2YJ1TXxcTLk3zQjM1GGv2E69WNfo=";
  };

  patches = [
    # meson build system patch
    (fetchpatch {
      url = "https://gitlab.freedesktop.org/xorg/app/xclock/-/commit/28e10bd26ac7e02fe8a4fb8016bb115f8d664032.patch";
      hash = "sha256-KdrS7VneJqwVPB+TRJoMmtR03Ju3PvvUMYfXz5tII6k=";
    })
  ];

  strictDeps = true;

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    wrapWithXFileSearchPathHook
  ];

  buildInputs = [
    libx11
    libxaw
    libxft
    libxkbfile
    libxmu
    libxrender
    libxt
    xorgproto
  ];

  mesonFlags = [
    (lib.mesonOption "appdefaultdir" "${placeholder "out"}/share/X11/app-defaults")
  ];

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

  meta = {
    description = "analog / digital clock for X";
    longDescription = ''
      xclock is the classic X Window System clock utility. It displays the time in analog or digital
      form, continuously updated at a frequency which may be specified by the user.
    '';
    homepage = "https://gitlab.freedesktop.org/xorg/app/xclock";
    license = with lib.licenses; [
      mitOpenGroup
      hpnd
      mit
    ];
    mainProgram = "xclock";
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
})
+64 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitLab,
  autoreconfHook,
  pkg-config,
  util-macros,
  wrapWithXFileSearchPathHook,
  fontconfig,
  libxaw,
  libxft,
  libxkbfile,
  libxmu,
  libxrender,
  libxt,
  xorgproto,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xfd";
  version = "1.1.4";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    group = "xorg";
    owner = "app";
    repo = "xfd";
    tag = "xfd-${finalAttrs.version}";
    hash = "sha256-8kkoJILNlVgDIV029mF3err6es5V001FQqUnTtD9/LQ=";
  };

  strictDeps = true;

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

  buildInputs = [
    fontconfig
    libxaw
    libxft
    libxkbfile
    libxmu
    libxrender
    libxt
    xorgproto
  ];

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

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

  meta = {
    description = "X font display utility, using either the X11 core protocol or libXft2.";
    homepage = "https://gitlab.freedesktop.org/xorg/app/xfd";
    license = lib.licenses.mitOpenGroup;
    mainProgram = "xfd";
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
})
+55 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  libxfont_2,
  xorgproto,
  xtrans,
  writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "xfs";
  version = "1.2.2";

  src = fetchurl {
    url = "mirror://xorg/individual/app/xfs-${finalAttrs.version}.tar.xz";
    hash = "sha256-twvUYzHiQbMOXgDb3C6rt/P4iAzUQkSs3hPXl20Jjsw=";
  };

  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    libxfont_2
    xorgproto
    xtrans
  ];

  passthru = {
    updateScript = writeScript "update-${finalAttrs.pname}" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p common-updater-scripts
      version="$(list-directory-versions --pname ${finalAttrs.pname} \
        --url https://xorg.freedesktop.org/releases/individual/app/ \
        | sort -V | tail -n1)"
      update-source-version ${finalAttrs.pname} "$version"
    '';
  };

  meta = {
    description = "X Font Server, for X11 core protocol fonts";
    homepage = "https://gitlab.freedesktop.org/xorg/app/xfs";
    license = with lib.licenses; [
      mitOpenGroup
      hpndSellVariant
      x11
      hpnd
    ];
    mainProgram = "xfs";
    maintainers = [ ];
    platforms = lib.platforms.unix;
    broken = stdenv.hostPlatform.isStatic;
  };
})
+6 −144
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@
  xbitmaps,
  xcalc,
  xcb-proto,
  xclock,
  xcmsdb,
  xcompmgr,
  xconsole,
@@ -126,7 +127,9 @@
  xdriinfo,
  xev,
  xeyes,
  xfd,
  xfontsel,
  xfs,
  xfsinfo,
  xgamma,
  xgc,
@@ -197,6 +200,7 @@ self: with self; {
    xbacklight
    xbitmaps
    xcalc
    xclock
    xcmsdb
    xcompmgr
    xconsole
@@ -206,7 +210,9 @@ self: with self; {
    xdriinfo
    xev
    xeyes
    xfd
    xfontsel
    xfs
    xfsinfo
    xgamma
    xgc
@@ -364,58 +370,6 @@ self: with self; {
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xclock = callPackage (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libX11,
      libXaw,
      libXft,
      libxkbfile,
      libXmu,
      xorgproto,
      libXrender,
      libXt,
      wrapWithXFileSearchPathHook,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xclock";
      version = "1.1.1";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xclock-1.1.1.tar.xz";
        sha256 = "0b3l1zwz2b1cn46f8pd480b835j9anadf929vqpll107iyzylz6z";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [
        pkg-config
        wrapWithXFileSearchPathHook
      ];
      buildInputs = [
        libX11
        libXaw
        libXft
        libxkbfile
        libXmu
        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!
  xf86inputevdev = callPackage (
    {
@@ -2162,98 +2116,6 @@ self: with self; {
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xfd = callPackage (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libxkbfile,
      fontconfig,
      libXaw,
      libXft,
      libXmu,
      xorgproto,
      libXrender,
      libXt,
      gettext,
      wrapWithXFileSearchPathHook,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xfd";
      version = "1.1.4";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xfd-1.1.4.tar.xz";
        sha256 = "1zbnj0z28dx2rm2h7pjwcz7z1jnl28gz0v9xn3hs2igxcvxhyiym";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [
        pkg-config
        gettext
        wrapWithXFileSearchPathHook
      ];
      buildInputs = [
        libxkbfile
        fontconfig
        libXaw
        libXft
        libXmu
        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!
  xfs = callPackage (
    {
      stdenv,
      pkg-config,
      fetchurl,
      libXfont2,
      xorgproto,
      xtrans,
      testers,
    }:
    stdenv.mkDerivation (finalAttrs: {
      pname = "xfs";
      version = "1.2.2";
      builder = ./builder.sh;
      src = fetchurl {
        url = "mirror://xorg/individual/app/xfs-1.2.2.tar.xz";
        sha256 = "1k4f15nrgmqkvsn48hnl1j4giwxpmcpdrnq0bq7b6hg265ix82xp";
      };
      hardeningDisable = [
        "bindnow"
        "relro"
      ];
      strictDeps = true;
      nativeBuildInputs = [ pkg-config ];
      buildInputs = [
        libXfont2
        xorgproto
        xtrans
      ];
      passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
      meta = {
        pkgConfigModules = [ ];
        platforms = lib.platforms.unix;
      };
    })
  ) { };

  # THIS IS A GENERATED FILE.  DO NOT EDIT!
  xinit = callPackage (
    {
+6 −0
Original line number Diff line number Diff line
@@ -448,6 +448,7 @@ print OUT <<EOF;
  xbitmaps,
  xcalc,
  xcb-proto,
  xclock,
  xcmsdb,
  xcompmgr,
  xconsole,
@@ -458,7 +459,9 @@ print OUT <<EOF;
  xdriinfo,
  xev,
  xeyes,
  xfd,
  xfontsel,
  xfs,
  xfsinfo,
  xgamma,
  xgc,
@@ -529,6 +532,7 @@ self: with self; {
    xbacklight
    xbitmaps
    xcalc
    xclock
    xcmsdb
    xcompmgr
    xconsole
@@ -538,7 +542,9 @@ self: with self; {
    xdriinfo
    xev
    xeyes
    xfd
    xfontsel
    xfs
    xfsinfo
    xgamma
    xgc
Loading