mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 19:23:50 +00:00
92e6b205ed
Fixes build.
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{ lib
|
||
, stdenv
|
||
, file
|
||
, fetchFromGitLab
|
||
, buildPerlPackage
|
||
, ArchiveZip
|
||
, ArchiveCpio
|
||
, SubOverride
|
||
, shortenPerlShebang
|
||
}:
|
||
|
||
buildPerlPackage rec {
|
||
pname = "strip-nondeterminism";
|
||
version = "1.13.1";
|
||
|
||
outputs = [ "out" "dev" ]; # no "devdoc"
|
||
|
||
src = fetchFromGitLab {
|
||
owner = "reproducible-builds";
|
||
repo = "strip-nondeterminism";
|
||
domain = "salsa.debian.org";
|
||
rev = version;
|
||
sha256 = "czx9UhdgTsQSfDNo1mMOXCM/3/nuNe+cPZeyy2xdnKs=";
|
||
};
|
||
|
||
strictDeps = true;
|
||
nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
|
||
buildInputs = [
|
||
ArchiveZip
|
||
ArchiveCpio
|
||
];
|
||
|
||
nativeCheckInputs = [ SubOverride ];
|
||
|
||
postPatch = ''
|
||
substituteInPlace lib/File/StripNondeterminism.pm \
|
||
--replace "exec('file'" "exec('${lib.getExe file}'"
|
||
'';
|
||
|
||
|
||
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
|
||
'';
|
||
|
||
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 artturin ];
|
||
};
|
||
}
|