diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/icu/base.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/icu/base.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/icu/base.nix b/nixpkgs/pkgs/development/libraries/icu/base.nix index 0a8cb7d46843..e51224433e8b 100644 --- a/nixpkgs/pkgs/development/libraries/icu/base.nix +++ b/nixpkgs/pkgs/development/libraries/icu/base.nix @@ -1,4 +1,4 @@ -{ version, sha256, patches ? [], patchFlags ? "" }: +{ version, sha256, patches ? [], patchFlags ? [] }: { stdenv, lib, fetchurl, fixDarwinDylibNames # Cross-compiled icu4c requires a build-root of a native compile , buildRootOnly ? false, nativeBuildRoot @@ -63,10 +63,16 @@ let # remove dependency on bootstrap-tools in early stdenv build postInstall = stdenv.lib.optionalString stdenv.isDarwin '' sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc - '' + '' + '' + (let + replacements = [ + { from = "\${prefix}/include"; to = "${placeholder "dev"}/include"; } # --cppflags-searchpath + { from = "\${pkglibdir}/Makefile.inc"; to = "${placeholder "dev"}/lib/icu/Makefile.inc"; } # --incfile + { from = "\${pkglibdir}/pkgdata.inc"; to = "${placeholder "dev"}/lib/icu/pkgdata.inc"; } # --incpkgdatafile + ]; + in '' substituteInPlace "$dev/bin/icu-config" \ - --replace \''${pkglibdir}/Makefile.inc "$dev/lib/icu/Makefile.inc" - ''; + ${lib.concatMapStringsSep " " (r: "--replace '${r.from}' '${r.to}'") replacements} + ''); postFixup = ''moveToOutput lib/icu "$dev" ''; }; |