summary refs log tree commit diff
path: root/pkgs/development/perl-modules
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-01-06 21:39:28 +0200
committerArtturin <Artturin@artturin.com>2023-01-09 18:33:56 +0200
commitd5febb8d7a68a9b1aac6385d63974408d46ecbe2 (patch)
tree58285e6d85ea449085fbeaa44a0ebc014984d4cb /pkgs/development/perl-modules
parent398bad9c8f8691b773982130b654943f5fbfdb29 (diff)
downloadnixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar.gz
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar.bz2
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar.lz
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar.xz
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.tar.zst
nixpkgs-d5febb8d7a68a9b1aac6385d63974408d46ecbe2.zip
strip-nondeterminism: 1.0.0 -> 1.13.0
https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/tags/1.13.0

move shortenPerlShebang to postBuild to fix tests
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r--pkgs/development/perl-modules/strip-nondeterminism/default.nix49
1 files changed, 35 insertions, 14 deletions
diff --git a/pkgs/development/perl-modules/strip-nondeterminism/default.nix b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
index ba2134d1b97..d2b28afd612 100644
--- a/pkgs/development/perl-modules/strip-nondeterminism/default.nix
+++ b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
@@ -1,8 +1,17 @@
-{ lib, stdenv, file, fetchFromGitLab, buildPerlPackage, ArchiveZip, ArchiveCpio, shortenPerlShebang }:
+{ lib
+, stdenv
+, file
+, fetchFromGitLab
+, buildPerlPackage
+, ArchiveZip
+, ArchiveCpio
+, SubOverride
+, shortenPerlShebang
+}:
 
 buildPerlPackage rec {
   pname = "strip-nondeterminism";
-  version = "1.0.0";
+  version = "1.13.0";
 
   outputs = [ "out" "dev" ]; # no "devdoc"
 
@@ -11,30 +20,42 @@ buildPerlPackage rec {
     repo = "strip-nondeterminism";
     domain = "salsa.debian.org";
     rev = version;
-    sha256 = "1pwar1fyadqxmvb7x4zyw2iawbi5lsfjcg0ps9n9rdjb6an7vv64";
+    sha256 = "sha256-KZQeoJYBPJzUvz4wlUZbiGODbpCp7/52dsg5OemKDkI=";
   };
 
-  # stray test failure
-  doCheck = false;
-
+  strictDeps = true;
   nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
-  buildInputs = [ ArchiveZip ArchiveCpio ];
-  propagatedNativeBuildInputs = [ file ];
+  buildInputs = [
+    ArchiveZip
+    ArchiveCpio
+  ];
+
+  checkInputs = [ SubOverride ];
+
+  postPatch = ''
+    substituteInPlace lib/File/StripNondeterminism.pm \
+      --replace "exec('file'" "exec('${lib.getExe file}'"
+  '';
 
-  perlPostHook = ''
+
+  postBuild = ''
+    patchShebangs ./bin
+  '' + lib.optionalString stdenv.isDarwin ''
+    shortenPerlShebang bin/strip-nondeterminism
+  '';
+
+  postInstall = ''
     # we don’t need the debhelper script
     rm $out/bin/dh_strip_nondeterminism
-    rm $out/share/man/man1/dh_strip_nondeterminism.1.gz
+    rm $out/share/man/man1/dh_strip_nondeterminism.1
   '';
 
-  postInstall = lib.optionalString stdenv.isDarwin ''
-    shortenPerlShebang $out/bin/strip-nondeterminism
-  '';
+  doCheck = true;
 
   meta = with lib; {
     description = "A Perl module for stripping bits of non-deterministic information";
     homepage = "https://reproducible-builds.org/";
     license = licenses.gpl3Only;
-    maintainers = with maintainers; [ pSub ];
+    maintainers = with maintainers; [ pSub artturin ];
   };
 }