gnu: cups: Fix build failure in reset-gzip-timestamps phase.
authorLeo Famulari <leo@famulari.name>
Tue, 28 Feb 2017 07:03:56 +0000 (02:03 -0500)
committerLeo Famulari <leo@famulari.name>
Tue, 28 Feb 2017 07:09:50 +0000 (02:09 -0500)
* gnu/packages/cups.scm (cups)[arguments]: Add 'make-manpages-writable' phase.

gnu/packages/cups.scm

index 2649cd3..dc070ff 100644 (file)
@@ -275,6 +275,14 @@ device-specific programs to convert and print many types of files.")
                   (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
                  (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
                   (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
+         ;; Make the compressed manpages writable so that the
+         ;; reset-gzip-timestamps phase does not error out.
+         (add-before 'reset-gzip-timestamps 'make-manpages-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man")))
+               (for-each (lambda (file) (chmod file #o644))
+                         (find-files man "\\.gz")))))
          (add-after 'install 'install-cups-filters-symlinks
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))