1{ lib, stdenv, fetchurl, gettext }:
2
3# Note: this package is used for bootstrapping fetchurl, and thus
4# cannot use fetchpatch! All mutable patches (generated by GitHub or
5# cgit) that are needed here should be included directly in Nixpkgs as
6# files.
7
8stdenv.mkDerivation rec {
9 pname = "attr";
10 version = "2.5.1";
11
12 src = fetchurl {
13 url = "mirror://savannah/attr/${pname}-${version}.tar.gz";
14 sha256 = "1y6sibbkrcjygv8naadnsg6xmsqwfh6cwrqk01l0v2i5kfacdqds";
15 };
16
17 outputs = [ "bin" "dev" "out" "man" "doc" ];
18
19 nativeBuildInputs = [ gettext ];
20
21 postPatch = ''
22 for script in install-sh include/install-sh; do
23 patchShebangs $script
24 done
25 '';
26
27 meta = with lib; {
28 homepage = "https://savannah.nongnu.org/projects/attr/";
29 description = "Library and tools for manipulating extended attributes";
30 platforms = platforms.linux;
31 license = licenses.gpl2Plus;
32 };
33}