Merge pull request #96959 from kampka/intltool

intltool: fix cross-platform build
This commit is contained in:
Michael Raskin 2020-09-04 05:22:53 +00:00 committed by GitHub
commit 7a76b1c26d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, gettext, perlPackages }:
{ stdenv, fetchurl, fetchpatch, gettext, perlPackages, buildPackages }:
stdenv.mkDerivation rec {
pname = "intltool";
@ -19,8 +19,14 @@ stdenv.mkDerivation rec {
sha256 = "12q2140867r5d0dysly72khi7b0mm2gd7nlm1k81iyg7fxgnyz45";
})];
propagatedBuildInputs = [ gettext ] ++ (with perlPackages; [ perl XMLParser ]);
nativeBuildInputs = with perlPackages; [ perl XMLParser ];
propagatedBuildInputs = [ gettext ];
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
for f in $out/bin/*; do
substituteInPlace $f --replace "${buildPackages.perl}" "${perlPackages.perl}"
done
'';
meta = with stdenv.lib; {
description = "Translation helper tool";
homepage = "https://launchpad.net/intltool/";