Unverified Commit 00d1feae authored by Alyssa Ross's avatar Alyssa Ross
Browse files

imagemagick: use the right pkg-config in *-config

If we're building buildPackages.imagemagick, the imagemagick libraries
will be built for the local system, but we were previously using the
pkg-config for the cross system in the *-config scripts bundled with
ImageMagick.  I suspect the reason it wasn't noticed for a long time
was that packages that are using still old-style *-config scripts
instead of pkg-config probably don't cross compile anyway.  I noticed
because I wondered why buildPackages.imagemagick when cross-compiling
was not the same as my native imagemagick, so as a happy side effect
of this change, users won't have to rebuild imagemagick any more when
it's used as a native build input for a cross-compiled package.
parent 41214830
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: {
    moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params
    for file in "$dev"/bin/*-config; do
      substituteInPlace "$file" --replace pkg-config \
        "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config'"
        "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '$(command -v $PKG_CONFIG)'"
    done
  '' + lib.optionalString ghostscriptSupport ''
    for la in $out/lib/*.la; do