intltool: fix cross-platform build

This commit is contained in:
Christian Kampka 2020-09-02 17:32:22 +02:00
parent ccde657295
commit e7208291d2
No known key found for this signature in database
GPG key ID: B88E140DB4FE1AA5

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/";