gnu: mblaze: Offer contrib executables.
* gnu/packages/mail.scm (mblaze)[outputs, inputs]: New fields. [arguments]: Add #:modules. Add 'install-contrib' phase. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
		
							parent
							
								
									ff3355dcbf
								
							
						
					
					
						commit
						35a1de1a4c
					
				
					 1 changed files with 41 additions and 3 deletions
				
			
		|  | @ -93,6 +93,7 @@ | ||||||
|   #:use-module (gnu packages file) |   #:use-module (gnu packages file) | ||||||
|   #:use-module (gnu packages fontutils) |   #:use-module (gnu packages fontutils) | ||||||
|   #:use-module (gnu packages freedesktop) |   #:use-module (gnu packages freedesktop) | ||||||
|  |   #:use-module (gnu packages gawk) | ||||||
|   #:use-module (gnu packages gdb) |   #:use-module (gnu packages gdb) | ||||||
|   #:use-module (gnu packages gettext) |   #:use-module (gnu packages gettext) | ||||||
|   #:use-module (gnu packages ghostscript) |   #:use-module (gnu packages ghostscript) | ||||||
|  | @ -2746,18 +2747,55 @@ converts them to maildir format directories.") | ||||||
|        (file-name (git-file-name name version)) |        (file-name (git-file-name name version)) | ||||||
|        (sha256 |        (sha256 | ||||||
|         (base32 "0fa8s9dp5ilwmfcwkx72x2b5i0maa5sl97hv2cdknqmc27gv0b1c")))) |         (base32 "0fa8s9dp5ilwmfcwkx72x2b5i0maa5sl97hv2cdknqmc27gv0b1c")))) | ||||||
|  |     (outputs '("out" "contrib")) | ||||||
|     (build-system gnu-build-system) |     (build-system gnu-build-system) | ||||||
|     (native-inputs |     (inputs (list bash-minimal | ||||||
|      (list perl)) |                   coreutils | ||||||
|  |                   gawk | ||||||
|  |                   glibc | ||||||
|  |                   gnupg | ||||||
|  |                   ncurses | ||||||
|  |                   openssl | ||||||
|  |                   ruby | ||||||
|  |                   sed)) | ||||||
|  |     (native-inputs (list perl)) | ||||||
|     (arguments |     (arguments | ||||||
|      (list |      (list | ||||||
|       #:make-flags |       #:make-flags | ||||||
|       #~(list #$(string-append "CC=" (cc-for-target)) |       #~(list #$(string-append "CC=" (cc-for-target)) | ||||||
|               "PREFIX=" |               "PREFIX=" | ||||||
|               (string-append "DESTDIR=" #$output)) |               (string-append "DESTDIR=" #$output)) | ||||||
|  |       #:modules '((ice-9 ftw) | ||||||
|  |                   (guix build utils) | ||||||
|  |                   (guix build gnu-build-system)) | ||||||
|       #:phases |       #:phases | ||||||
|       #~(modify-phases %standard-phases |       #~(modify-phases %standard-phases | ||||||
|           (delete 'configure)))) |           (delete 'configure) | ||||||
|  |           (add-after 'install 'install-contrib | ||||||
|  |             (lambda* (#:key inputs outputs #:allow-other-keys) | ||||||
|  |               (let* ((out (assoc-ref outputs "out")) | ||||||
|  |                      (contrib (assoc-ref outputs "contrib")) | ||||||
|  |                      (contrib-bin (string-append contrib "/bin")) | ||||||
|  |                      (exe? (lambda (file) | ||||||
|  |                              (let ((s (stat file))) | ||||||
|  |                                (and (eq? 'regular (stat:type s)) | ||||||
|  |                                     (logtest #o100 (stat:perms s))))))) | ||||||
|  |                 (mkdir-p contrib-bin) | ||||||
|  |                 (with-directory-excursion "contrib" | ||||||
|  |                   (for-each | ||||||
|  |                     (lambda (prog) | ||||||
|  |                       (install-file prog contrib-bin) | ||||||
|  |                       (wrap-program (string-append contrib-bin "/" prog) | ||||||
|  |                        `("PATH" = | ||||||
|  |                          (,contrib-bin | ||||||
|  |                           ,(string-append out "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "coreutils") "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "gawk") "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "glibc") "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "ncurses") "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "openssl") "/bin") | ||||||
|  |                           ,(string-append (assoc-ref inputs "sed") "/bin"))))) | ||||||
|  |                     (scandir "." exe?))))))))) | ||||||
|     (home-page "https://github.com/leahneukirchen/mblaze") |     (home-page "https://github.com/leahneukirchen/mblaze") | ||||||
|     (synopsis "Unix utilities to deal with Maildir") |     (synopsis "Unix utilities to deal with Maildir") | ||||||
|     (description |     (description | ||||||
|  |  | ||||||
		Reference in a new issue