1 { lib, stdenv, fetchgit, python3, perl }:
3 stdenv.mkDerivation rec {
8 url = "https://git.savannah.gnu.org/git/gnulib.git";
9 rev = "0a01f6737dc5666c730bdfe6a038da53a4156cc2";
10 hash = "sha256-kbmXnXXoaTPGwjUJvnHWCQFS2KGQ9fsjIyloNmkKdc4=";
14 patchShebangs gnulib-tool.py
15 substituteInPlace build-aux/{prefix-gnulib-mk,useless-if-before-free,update-copyright,gitlog-to-changelog,announce-gen} \
16 --replace-fail 'exec perl' 'exec ${lib.getExe perl}'
19 buildInputs = [ python3 ];
24 ln -s $out/lib $out/include
25 ln -s $out/gnulib-tool $out/bin/
28 # do not change headers to not update all vendored build files
32 # This patch is used by multiple other packages (currently:
33 # gnused, gettext) which contain vendored copies of gnulib.
34 # Without it, compilation will fail with error messages about
35 # "__LDBL_REDIR1_DECL" or similar on platforms with longdouble
36 # redirects (currently powerpc64). Once all of those other
37 # packages make a release with a newer gnulib we can drop this
39 longdouble-redirect-patch = ./gnulib-longdouble-redirect.patch;
43 description = "Central location for code to be shared among GNU packages";
44 homepage = "https://www.gnu.org/software/gnulib/";
45 changelog = "https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=ChangeLog";
46 license = licenses.gpl3Plus;
47 mainProgram = "gnulib-tool";
48 platforms = platforms.unix;