Skip to content

Instantly share code, notes, and snippets.

@alanz
Created February 23, 2022 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanz/4245ba34ca4cc8014dd7ad5ceb015acf to your computer and use it in GitHub Desktop.
Save alanz/4245ba34ca4cc8014dd7ad5ceb015acf to your computer and use it in GitHub Desktop.
(define-module (imagemagick-az)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages imagemagick)
#:use-module (srfi srfi-1))
(define-public imagemagick-az
(package
(inherit imagemagick)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-hardcoded-paths
(lambda _
(substitute* "config/policy.xml"
(("<!-- <policy domain=\"resource\" name=\"memory\" value=\"2GiB\"/> -->")
"<policy domain=\"resource\" name=\"memory\" value=\"2GiB\"/>"
)
)
))
)))
))
imagemagick-az
;; invoke as `guix package --install-from-file=my-imagemagick.scm`
;;
;; log ends as
;;
;; ld: cannot find crti.o: No such file or directory
;; ld: cannot find -ljpeg
;; ld: cannot find -lbz2
;; collect2: error: ld returned 1 exit status
;; make[1]: *** [Makefile:7178: magick/libMagickCore-6.Q16.la] Error 1
;; make[1]: *** Waiting for unfinished jobs....
;; make[1]: Leaving directory '/tmp/guix-build-imagemagick-6.9.12-4.drv-0/ImageMagick-6.9.12-4'
;; make: *** [Makefile:5679: all] Error 2
;; error: in phase 'build': uncaught exception:
;; %exception #<&invoke-error program: "make" arguments: ("-j" "12") exit-status: 2 term-signal: #f stop-signal: #f>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment