1{ lib, stdenv, fetchgit, python3 }:
2
3stdenv.mkDerivation {
4 pname = "gnulib";
5 version = "20210702";
6
7 src = fetchgit {
8 url = "https://git.savannah.gnu.org/r/gnulib.git";
9 rev = "901694b904cd861adc2529b2e05a3fb33f9b534f";
10 sha256 = "1f5znlv2wjziglw9vlygdgm4jfbsz34h2dz6w4h90bl4hm0ycb1w";
11 };
12
13 postPatch = ''
14 patchShebangs gnulib-tool.py
15 '';
16
17 buildInputs = [ python3 ];
18
19 installPhase = ''
20 mkdir -p $out/bin
21 cp -r * $out/
22 ln -s $out/lib $out/include
23 ln -s $out/gnulib-tool $out/bin/
24 '';
25
26 # do not change headers to not update all vendored build files
27 dontFixup = true;
28
29 meta = with lib; {
30 homepage = "https://www.gnu.org/software/gnulib/";
31 description = "Central location for code to be shared among GNU packages";
32 license = licenses.gpl3Plus;
33 platforms = platforms.unix;
34 };
35}