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
This commit is contained in:
parent
fa169bb239
commit
d707691b35
|
@ -40,17 +40,25 @@ buildPerlPackage rec {
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
patchShebangs ./bin
|
patchShebangs ./bin
|
||||||
'' + lib.optionalString stdenv.isDarwin ''
|
|
||||||
shortenPerlShebang bin/strip-nondeterminism
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# we don’t need the debhelper script
|
# we don’t need the debhelper script
|
||||||
rm $out/bin/dh_strip_nondeterminism
|
rm $out/bin/dh_strip_nondeterminism
|
||||||
rm $out/share/man/man1/dh_strip_nondeterminism.1
|
rm $out/share/man/man1/dh_strip_nondeterminism.1
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
shortenPerlShebang $out/bin/strip-nondeterminism
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
installCheckPhase = ''
|
||||||
|
runHook preInstallCheck
|
||||||
|
($out/bin/strip-nondeterminism --help 2>&1 | grep -q "verbose") || (echo "'$out/bin/strip-nondeterminism --help' failed" && exit 1)
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
# running shortenPerlShebang in postBuild results in non-functioning binary 'exec format error'
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Perl module for stripping bits of non-deterministic information";
|
description = "A Perl module for stripping bits of non-deterministic information";
|
||||||
|
|
Loading…
Reference in a new issue