diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/freeimage')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/freeimage/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/freeimage/default.nix b/nixpkgs/pkgs/development/libraries/freeimage/default.nix index 236305a572bf..87997cead43f 100644 --- a/nixpkgs/pkgs/development/libraries/freeimage/default.nix +++ b/nixpkgs/pkgs/development/libraries/freeimage/default.nix @@ -18,6 +18,14 @@ stdenv.mkDerivation { prePatch = "rm -rf Source/Lib* Source/OpenEXR Source/ZLib"; patches = [ ./unbundle.diff ]; + postPatch = '' + # To support cross compilation, use the correct `pkg-config`. + substituteInPlace Makefile.fip \ + --replace "pkg-config" "$PKG_CONFIG" + substituteInPlace Makefile.gnu \ + --replace "pkg-config" "$PKG_CONFIG" + ''; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.isDarwin [ |