Skip to content

Commit

Permalink
Merge pull request #72869 from redvers/icu-issue-71142
Browse files Browse the repository at this point in the history
icu: bugfix #71142 - Fixes icu-config reporting bad location
  • Loading branch information
7c6f434c committed Nov 7, 2019
2 parents 3f2a425 + c8bfae0 commit 66488f3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkgs/development/libraries/icu/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" '';
};
Expand Down

0 comments on commit 66488f3

Please sign in to comment.