summary refs log tree commit diff
path: root/pkgs/development/perl-modules
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-02-14 05:31:43 +0200
committerArtturin <Artturin@artturin.com>2023-02-14 05:47:43 +0200
commitd707691b3574998bcd10028c1419ca6695e8713d (patch)
tree88168d565a08de671571a6b50c859b7f52cfe213 /pkgs/development/perl-modules
parentfa169bb239d7b2d860af851573569182ee5e0127 (diff)
downloadnixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar.gz
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar.bz2
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar.lz
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar.xz
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.tar.zst
nixpkgs-d707691b3574998bcd10028c1419ca6695e8713d.zip
strip-nondeterminism: fix binary functioning on darwin
result/bin/strip-nondeterminism: bad interpreter: /nix/store/mym5b5zbzgny17ixqr8kgwmndc3k4y2r-perl-5.36.0/bin/perl -I/nix/store/mym5b5zbzgny17ixqr8kgwmndc3k4y2r-perl-5.36.0/lib: exec format error
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r--pkgs/development/perl-modules/strip-nondeterminism/default.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/perl-modules/strip-nondeterminism/default.nix b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
index 806ad65b737..f867e843743 100644
--- a/pkgs/development/perl-modules/strip-nondeterminism/default.nix
+++ b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
@@ -40,17 +40,25 @@ buildPerlPackage rec {
 
   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
+  '' + lib.optionalString stdenv.isDarwin ''
+    shortenPerlShebang $out/bin/strip-nondeterminism
+  '';
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+    ($out/bin/strip-nondeterminism --help 2>&1 | grep -q "verbose") || (echo "'$out/bin/strip-nondeterminism --help' failed" && exit 1)
+    runHook postInstallCheck
   '';
 
-  doCheck = true;
+  # running shortenPerlShebang in postBuild results in non-functioning binary 'exec format error'
+  doCheck = !stdenv.isDarwin;
+  doInstallCheck = true;
 
   meta = with lib; {
     description = "A Perl module for stripping bits of non-deterministic information";