diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 169576f29bf..48a29e147f0 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -85,7 +85,9 @@ stdenv.mkDerivation rec { moveToOutput "bin/*-config" "$dev" moveToOutput "lib/ImageMagick-*/config-Q16" "$dev" # includes configure params for file in "$dev"/bin/*-config; do - substituteInPlace "$file" --replace pkg-config \ + substituteInPlace "$file" --replace "${pkgconfig}/bin/pkg-config -config" \ + ${pkgconfig}/bin/pkg-config + substituteInPlace "$file" --replace ${pkgconfig}/bin/pkg-config \ "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkgconfig}/bin/pkg-config'" done '' + lib.optionalString (ghostscript != null) ''