diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-28 14:39:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-10 08:52:36 +0000 |
commit | 693e64ef7421374338ddb1dc12b9573feec75972 (patch) | |
tree | 2526ac075d248699c35d63e04499890ee4381f5f /nixpkgs/pkgs/tools/misc/rmlint/default.nix | |
parent | 7014df2256694d97093d6f2bb1db340d346dea88 (diff) | |
parent | 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17 (diff) | |
download | nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.gz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.bz2 nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.lz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.xz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.zst nixlib-693e64ef7421374338ddb1dc12b9573feec75972.zip |
Merge commit '8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/rmlint/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/rmlint/default.nix | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/tools/misc/rmlint/default.nix b/nixpkgs/pkgs/tools/misc/rmlint/default.nix index 09ebbe33a342..8211c5aebc77 100644 --- a/nixpkgs/pkgs/tools/misc/rmlint/default.nix +++ b/nixpkgs/pkgs/tools/misc/rmlint/default.nix @@ -18,6 +18,8 @@ , wrapGAppsHook , withGui ? false }: +assert withGui -> !stdenv.isDarwin; + with lib; stdenv.mkDerivation rec { pname = "rmlint"; @@ -30,12 +32,9 @@ stdenv.mkDerivation rec { sha256 = "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"; }; - CFLAGS="-I${lib.getDev util-linux}/include"; - nativeBuildInputs = [ pkg-config sphinx - gettext scons ] ++ lib.optionals withGui [ makeWrapper @@ -57,9 +56,21 @@ stdenv.mkDerivation rec { python3.pkgs.pygobject3 ]; - # this doesn't seem to support configureFlags, and appends $out afterwards, - # so add the --without-gui in front of it - prefixKey = lib.optionalString (!withGui) " --without-gui " + "--prefix="; + prePatch = '' + export CFLAGS="$NIX_CFLAGS_COMPILE" + export LDFLAGS="''${NIX_LDFLAGS//-rpath /-Wl,-rpath=}" + + # remove sources of nondeterminism + substituteInPlace lib/cmdline.c \ + --replace "__DATE__" "\"Jan 1 1970\"" \ + --replace "__TIME__" "\"00:00:00\"" + substituteInPlace docs/SConscript \ + --replace "gzip -c " "gzip -cn " + ''; + + prefixKey = "--prefix="; + + sconsFlags = lib.optionals (!withGui) [ "--without-gui" ]; # in GUI mode, this shells out to itself, and tries to import python modules postInstall = lib.optionalString withGui '' @@ -70,8 +81,8 @@ stdenv.mkDerivation rec { meta = { description = "Extremely fast tool to remove duplicates and other lint from your filesystem"; homepage = "https://rmlint.readthedocs.org"; - platforms = platforms.linux; + platforms = platforms.unix; license = licenses.gpl3; - maintainers = [ maintainers.koral ]; + maintainers = with maintainers; [ aaschmid koral ]; }; } |