aboutsummaryrefslogtreecommitdiff
path: root/tw/packages
diff options
context:
space:
mode:
authorTimo Wilken2023-06-03 19:10:02 +0200
committerTimo Wilken2023-06-03 19:10:02 +0200
commit35fb990b504eeda9fc7b86002a229f57d89332e5 (patch)
treea2e3646be893627229a5da72f218c7225af868f0 /tw/packages
parentca9c460f404af8904bf9ae614c23f4cf2129c7b6 (diff)
Fix build of php-imagick
Diffstat (limited to 'tw/packages')
-rw-r--r--tw/packages/php.scm25
1 files changed, 15 insertions, 10 deletions
diff --git a/tw/packages/php.scm b/tw/packages/php.scm
index 345babf4..a64446f7 100644
--- a/tw/packages/php.scm
+++ b/tw/packages/php.scm
@@ -90,18 +90,24 @@ which provides a drop in replacement for APC.")
(add-before 'check 'set-env-vars-for-check
(lambda _
(setenv "NO_INTERACTION" "1")
+ ;; We need to patch fonts.conf to point to at least one writable
+ ;; cache directory, else the test output will contain spurious
+ ;; "Fontconfig error: No writable cache directories" lines, which
+ ;; causes tests to fail.
+ (copy-file (string-append
+ (assoc-ref %build-inputs "fontconfig-minimal")
+ "/etc/fonts/fonts.conf")
+ "fonts.conf")
+ (substitute* "fonts.conf"
+ (("~/\\.fontconfig")
+ (string-append (getcwd) "/.fccache")))
+ (setenv "FONTCONFIG_FILE" (string-append (getcwd) "/fonts.conf"))
;; https://github.com/Imagick/imagick/blob/master/docker/nixos/shell.nix
- ;; Needed to avoid error message when using fonts
- ;; https://github.com/Imagick/imagick/issues/398
- (setenv "FONTCONFIG_FILE"
- (string-append
- (assoc-ref %build-inputs "fontconfig-minimal")
- "/etc/fonts/fonts.conf"))
;; Needed to allow Imagick::getConfigureOptions() to have all info
;; https://github.com/Imagick/imagick/issues/399
(setenv "MAGICK_CONFIGURE_PATH"
- (car (find-files (assoc-ref %build-inputs "imagemagick")
- "^configure\\.xml$")))))
+ (dirname (car (find-files (assoc-ref %build-inputs "imagemagick")
+ "^configure\\.xml$"))))))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
(use-modules (ice-9 popen)
@@ -130,8 +136,7 @@ which provides a drop in replacement for APC.")
(inputs (list php pcre2 imagemagick fontconfig))
(native-inputs (list autoconf ; for phpize
pkg-config
- re2c ; according to https://github.com/Imagick/imagick/blob/master/docker/nixos/shell.nix
- font-dejavu)) ; for unit tests
+ re2c)) ; according to https://github.com/Imagick/imagick/blob/master/docker/nixos/shell.nix
(home-page "https://pecl.php.net/package/imagick")
(synopsis "A PHP wrapper for the ImageMagick library")
(description "Imagick is a native PHP extension to create and modify