From 0c61047055ee99123a9d382cb1fffe3180ad1d0a Mon Sep 17 00:00:00 2001 From: Alistair Grant Date: Sat, 2 Nov 2024 19:31:49 +0100 Subject: [PATCH] imagemagick: include configure.xml (#353169) `magick -list configure` relies on the configuration file being in a known location. Copy `configure.xml` to `share/ImageMagick-/`, minus paths which may be in other outputs. --- pkgs/applications/graphics/ImageMagick/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index fd45ff16d257b..aeb23e5761c27 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -120,8 +120,13 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' (cd "$dev/include" && ln -s ImageMagick* ImageMagick) + # Q16HDRI = 16 bit quantum depth with HDRI support, and is the default ImageMagick configuration + # If the default is changed, or the derivation is modified to use a different configuration + # this will need to be changed below. moveToOutput "bin/*-config" "$dev" moveToOutput "lib/ImageMagick-*/config-Q16HDRI" "$dev" # includes configure params + configDestination=($out/share/ImageMagick-*) + grep -v '/nix/store' $dev/lib/ImageMagick-*/config-Q16HDRI/configure.xml > $configDestination/configure.xml for file in "$dev"/bin/*-config; do substituteInPlace "$file" --replace pkg-config \ "PKG_CONFIG_PATH='$dev/lib/pkgconfig' '$(command -v $PKG_CONFIG)'"