diff options
author | Rick van Schijndel <rol3517@gmail.com> | 2021-06-18 00:10:40 +0200 |
---|---|---|
committer | Rick van Schijndel <rol3517@gmail.com> | 2021-09-06 12:09:53 +0200 |
commit | 4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8 (patch) | |
tree | df9d4bd4a9a71efc16e112dc6145212a1c7b4785 | |
parent | c8cd39a4ca025236efb7fe4011cfd88a2081578e (diff) | |
download | nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar.gz nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar.bz2 nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar.lz nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar.xz nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.tar.zst nixpkgs-4f4ab52f4fde7d831e3dad4cd91f1da30a3d0ae8.zip |
freeimage: support cross-compilation
Co-authored-by: Doron Behar <doron.behar@gmail.com>
-rw-r--r-- | pkgs/development/libraries/freeimage/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/libraries/freeimage/default.nix b/pkgs/development/libraries/freeimage/default.nix index 236305a572b..87997cead43 100644 --- a/pkgs/development/libraries/freeimage/default.nix +++ b/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 [ |