3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/attr/default.nix
Matthew Bauer f36899e118 attr: inline syscall patch
Unfortunately the output of git.savannah.nongnu.org changes with each
gitweb update. This means that the current has
“0gja54fz79a9ma6b4mprnjxq77l5yg2z9xknlwhmkcrfnam02qxp” is no longer
correct:

$ nix-prefetch-url
https://git.savannah.nongnu.org/cgit/attr.git/patch/\?id=14adc898a36948267bfe5c63b399996879e94c98
1g8sky52rjg9fpmrddza1af89s9qd4bzsbxqb7mc5bv8gyh10s1k

Normally, we use fetchpatch to strip this out, but unfortunately attr
cannot use fetchpatch due to being used in bootstrapping fetchurl.
That is, it can’t use a custom postFetch since <nix/fetchurl.nix>
doesn’t support that.

To solve this problem, just inline the patch for now.
2020-07-31 08:56:53 +02:00

33 lines
772 B
Nix

{ stdenv, fetchurl, gettext }:
stdenv.mkDerivation rec {
name = "attr-2.4.48";
src = fetchurl {
url = "mirror://savannah/attr/${name}.tar.gz";
sha256 = "1rr4adzwax4bzr2c00f06zcsljv5y6p9wymz1g89ww7cb2rp5bay";
};
outputs = [ "bin" "dev" "out" "man" "doc" ];
nativeBuildInputs = [ gettext ];
patches = [
# fix fakechroot: https://github.com/dex4er/fakechroot/issues/57
./syscall.patch
];
postPatch = ''
for script in install-sh include/install-sh; do
patchShebangs $script
done
'';
meta = with stdenv.lib; {
homepage = "https://savannah.nongnu.org/projects/attr/";
description = "Library and tools for manipulating extended attributes";
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}