2021-02-17 17:02:09 +00:00
|
|
|
{ lib, stdenv, fetchgit, python3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "gnulib";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "20210702";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.savannah.gnu.org/r/gnulib.git";
|
2021-07-14 22:03:04 +00:00
|
|
|
rev = "901694b904cd861adc2529b2e05a3fb33f9b534f";
|
|
|
|
sha256 = "1f5znlv2wjziglw9vlygdgm4jfbsz34h2dz6w4h90bl4hm0ycb1w";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs gnulib-tool.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2021-02-17 17:02:09 +00:00
|
|
|
cp -r * $out/
|
|
|
|
ln -s $out/lib $out/include
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s $out/gnulib-tool $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
# do not change headers to not update all vendored build files
|
|
|
|
dontFixup = true;
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
passthru = {
|
|
|
|
# This patch is used by multiple other packages (currently:
|
|
|
|
# gnused, gettext) which contain vendored copies of gnulib.
|
|
|
|
# Without it, compilation will fail with error messages about
|
|
|
|
# "__LDBL_REDIR1_DECL" or similar on platforms with longdouble
|
|
|
|
# redirects (currently powerpc64). Once all of those other
|
|
|
|
# packages make a release with a newer gnulib we can drop this
|
|
|
|
# patch.
|
|
|
|
longdouble-redirect-patch = ./gnulib-longdouble-redirect.patch;
|
|
|
|
};
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Central location for code to be shared among GNU packages";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://www.gnu.org/software/gnulib/";
|
2021-02-17 17:02:09 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "gnulib-tool";
|
2021-02-17 17:02:09 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|