Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpExtensions.imagick: upgrade to ImageMagick 7 #106905

Merged
merged 1 commit into from Dec 22, 2020
Merged

Conversation

stephank
Copy link
Contributor

Motivation for this change

We use the imagick extension for conversion of PDFs to images, among other things. ImageMagick 6 invokes Ghostscript with -sDEVICE=pamcmyk32, which results in a lot of breakage, specifically large portions of text missing in the output. This appears to have been fixed in ImageMagick 7.

Note: I'm unclear about the impact of simply upgrading ImageMagick here. I assume the imagick API stays the same, but there are obviously behavioural changes going on here. How do we deal with this?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@etu
Copy link
Contributor

etu commented Dec 14, 2020

Hi! Thanks for your contribution! :)

The imagick extension for PHP is an extension and not a package, so the commit message should be phpExtensions.imagick: message because that's actual attribute name of the derivation.

I would say that I'm in favor of this change, we won't backport it to stable of course, so it ends up in the next stable. I mean ImageMagick 6 is older than 7. Sooner or later we would have to move forward.

@ofborg build phpExtensions.imagick

@stephank stephank changed the title phpPackages.imagick: upgrade to ImageMagick 7 phpExtensions.imagick: upgrade to ImageMagick 7 Dec 14, 2020
@stephank
Copy link
Contributor Author

Whoops! Typo'd it. I amended the commit with just the change in message.

@stephank
Copy link
Contributor Author

Hmm, just realised, URLs to GitHub PRs like that are not necessarily stable, at least not while they are open. I may have to make changes to the upstream PR because of feedback. So it may not be wise to merge this yet. 😕

@mohe2015
Copy link
Contributor

@stephank You could use https://github.com/Imagick/imagick/commit/09551fbf38c16cdaf4ade7c08744501cd82d2747.patch which is stable at least.

@etu
Copy link
Contributor

etu commented Dec 14, 2020

Missed some versions before :)

@ofborg build php73Extensions.imagick php74Extensions.imagick php80Extensions.imagick

@talyz
Copy link
Contributor

talyz commented Dec 15, 2020

I tried building on darwin, but it fails due to the anticipated hash mismatch on the patch.

@stephank
Copy link
Contributor Author

@talyz Ah, sorry. I just updated the upstream PR, you're quick. :)

I rebased this and updated it with the fixed URL.

@talyz
Copy link
Contributor

talyz commented Dec 15, 2020

Great! Now it builds fine on darwin :)

@ofborg build php73Extensions.imagick php74Extensions.imagick php80Extensions.imagick

@etu
Copy link
Contributor

etu commented Dec 22, 2020

@ofborg eval

@etu etu merged commit aa9bc1f into NixOS:master Dec 22, 2020
@stephank stephank deleted the imagick-7 branch December 23, 2020 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants