2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, gettext, perlPackages, buildPackages }:
|
2015-05-11 08:11:30 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "intltool";
|
2015-05-11 08:11:30 +01:00
|
|
|
version = "0.51.0";
|
|
|
|
|
2012-11-25 19:58:04 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://launchpad.net/intltool/trunk/${version}/+download/${pname}-${version}.tar.gz";
|
2015-05-11 08:11:30 +01:00
|
|
|
sha256 = "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7";
|
2012-11-25 19:58:04 +00:00
|
|
|
};
|
2013-01-31 16:41:07 +00:00
|
|
|
|
2016-03-29 10:12:42 +01:00
|
|
|
# fix "unescaped left brace" errors when using intltool in some cases
|
|
|
|
patches = [(fetchpatch {
|
2018-06-07 05:01:02 +01:00
|
|
|
name = "perl5.26-regex-fixes.patch";
|
2020-05-02 04:49:00 +01:00
|
|
|
url = [
|
|
|
|
"https://sources.debian.org/data/main/i/intltool/0.51.0-5/debian/patches/perl5.26-regex-fixes.patch"
|
|
|
|
"https://src.fedoraproject.org/rpms/intltool/raw/d8d2ef29fb122a42a6b6678eb1ec97ae56902af2/f/intltool-perl5.26-regex-fixes.patch"
|
|
|
|
];
|
2018-06-07 05:01:02 +01:00
|
|
|
sha256 = "12q2140867r5d0dysly72khi7b0mm2gd7nlm1k81iyg7fxgnyz45";
|
2016-03-29 10:12:42 +01:00
|
|
|
})];
|
|
|
|
|
2020-09-02 16:32:22 +01:00
|
|
|
nativeBuildInputs = with perlPackages; [ perl XMLParser ];
|
2020-09-04 07:42:43 +01:00
|
|
|
propagatedBuildInputs = [ gettext ] ++ (with perlPackages; [ perl XMLParser ]);
|
2012-11-25 19:58:04 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
2020-09-02 16:32:22 +01:00
|
|
|
for f in $out/bin/*; do
|
|
|
|
substituteInPlace $f --replace "${buildPackages.perl}" "${perlPackages.perl}"
|
|
|
|
done
|
|
|
|
'';
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2012-11-25 19:58:04 +00:00
|
|
|
description = "Translation helper tool";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://launchpad.net/intltool/";
|
2015-05-11 08:11:30 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.unix;
|
2012-11-25 19:58:04 +00:00
|
|
|
};
|
|
|
|
}
|