diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index fe30b701ed0c..3bfc215aea7b 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -27,6 +27,13 @@ stdenv.mkDerivation rec { patchShebangs ./configure ./run.sh ./test-driver-wrapper.sh ''; + # CMake files incorrectly calculate library path from dev prefix + # https://github.com/libexpat/libexpat/issues/501 + postFixup = '' + substituteInPlace $dev/lib/cmake/expat-${version}/expat-noconfig.cmake \ + --replace "$"'{_IMPORT_PREFIX}' $out + ''; + meta = with lib; { homepage = "https://libexpat.github.io/"; description = "A stream-oriented XML parser library written in C"; diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index b93e517def66..522c8cfa4a13 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -1,5 +1,5 @@ { - stdenv, lib, fetchFromGitHub, symlinkJoin, + stdenv, lib, fetchFromGitHub, cmake, expat, libyamlcpp, ilmbase, pystring, # Base dependencies glew, freeglut, # Only required on Linux @@ -25,8 +25,8 @@ stdenv.mkDerivation rec { sha256 = "194j9jp5c8ws0fryiz936wyinphnpzwpqnzvw9ryx6rbiwrba487"; }; - nativeBuildInputs = [ cmake (symlinkJoin { name = "expat"; paths = [ expat.out expat.dev ]; }) ]; - buildInputs = [ expat.out libyamlcpp ilmbase pystring ] + nativeBuildInputs = [ cmake ]; + buildInputs = [ expat libyamlcpp ilmbase pystring ] ++ lib.optionals stdenv.hostPlatform.isLinux [ glew freeglut ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon GLUT Cocoa ] ++ lib.optionals pythonBindings [ python3Packages.python python3Packages.pybind11 ]