Skip to content

Commit

Permalink
perlPackages.ImageMagick: use same version as main imagemagick package
Browse files Browse the repository at this point in the history
A recent update to ImageMagick fixed handling of Macintosh PICT files,
and updated the PerlMagick test files to match. The PerlMagick package
here was still using an old version, however, so its checkPhase was
failing. This change makes it use the `version` and `src` of imagemagick.

The new `preConfigure` command runs ImageMagick's top-level `./configure`
to create `Makefile.PL` from `Makefile.PL.in`, then does
`make perl-quantum-sources` to generate the appropriate module for the
ImageMagick configuration being used (Q16HDRI for now). The old `sed`
command for include paths seems to no longer be necessary.

Fixes #371857.

Co-authored-by: Michal Sojka <michal.sojka@cvut.cz>
(cherry picked from commit f397301)
  • Loading branch information
Rhys-T authored and github-actions[bot] committed Jan 11, 2025
1 parent 0afe9e5 commit b3694b0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pkgs/top-level/perl-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20731,15 +20731,16 @@ with self; {
PerlMagick = ImageMagick; # added 2021-08-02
ImageMagick = buildPerlPackage rec {
pname = "Image-Magick";
version = "7.1.1-20";
src = fetchurl {
url = "mirror://cpan/authors/id/J/JC/JCRISTY/Image-Magick-${version}.tar.gz";
hash = "sha256-oMAwXQBxuV2FgPHBhUi+toNFPVnRLNjZqdP2q+ki6jg=";
};
inherit (pkgs.imagemagick) version src;
sourceRoot = "${src.name}/PerlMagick";
buildInputs = [ pkgs.imagemagick ];
preConfigure =
''
sed -i -e 's|my \$INC_magick = .*|my $INC_magick = "-I${pkgs.imagemagick.dev}/include/ImageMagick";|' Makefile.PL
pushd ..
chmod -R +rwX .
./configure --with-perl
make perl-quantum-sources
popd
'';
meta = {
description = "Objected-oriented Perl interface to ImageMagick. Use it to read, manipulate, or write an image or image sequence from within a Perl script";
Expand Down

0 comments on commit b3694b0

Please sign in to comment.