From e4a205daa8a957d4d75eb6e2177f9076b347f76d Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Tue, 22 Oct 2024 18:31:59 -0400 Subject: [PATCH] rekahsoft-gnu: Update imapsync to 2.229 * rekahsoft-gnu/packages/perl.scm: Additionally, wrap the imapsync program so inputs do not need to be propagated. --- rekahsoft-gnu/packages/perl.scm | 123 ++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 55 deletions(-) diff --git a/rekahsoft-gnu/packages/perl.scm b/rekahsoft-gnu/packages/perl.scm index ae0fc58..1b7b05e 100644 --- a/rekahsoft-gnu/packages/perl.scm +++ b/rekahsoft-gnu/packages/perl.scm @@ -438,7 +438,7 @@ (define-public imapsync (package (name "imapsync") - (version "2.140") + (version "2.229") (source (origin (method git-fetch) (uri (git-reference @@ -447,62 +447,75 @@ (file-name (git-file-name name version)) (sha256 (base32 - "1k4rf582c3434yxj9brsjz0awakd84xwikghyq0h54darqwfm23j")))) - (build-system gnu-build-system) + "01z2x2j317g51p2ffsf8d3yy7lfxd0j0g4gl22nlcqvpwly5wlwy")))) + (build-system perl-build-system) (native-inputs (list inetutils perl)) - ;; TODO: these should be normal inputs, but currently the executable produced is not wrapped, so it fails to load the required libs - (propagated-inputs (list perl-cgi - perl-app-cpanminus - perl-crypt-openssl-rsa - perl-data-uniqid - perl-digest-hmac - perl-dist-checkconflicts - perl-encode - perl-encode-imaputf7 - perl-file-copy-recursive - perl-file-tail - perl-io-socket-inet6 - perl-io-socket-ssl - perl-io-tee - perl-json - perl-json-webtoken - perl-libwww - perl-mail-imapclient - perl-module-implementation - perl-module-scandeps - perl-net-ssleay - perl-ntlm - perl-package-stash - perl-par-packer - perl-parse-recdescent - perl-readonly - perl-regexp-common - perl-sys-meminfo - perl-term-readkey - perl-test-deep - perl-test-fatal - perl-test-mock-guard - perl-test-mockobject - perl-test-pod - perl-test-requires - perl-unicode-string - perl-uri - perl-try-tiny)) + (inputs (list perl-cgi + perl-app-cpanminus + perl-crypt-openssl-rsa + perl-data-uniqid + perl-digest-hmac + perl-dist-checkconflicts + perl-encode + perl-encode-imaputf7 + perl-file-copy-recursive + perl-file-tail + perl-io-socket-inet6 + perl-io-socket-ssl + perl-io-tee + perl-json + perl-json-webtoken + perl-libwww + perl-mail-imapclient + perl-module-implementation + perl-module-scandeps + perl-net-ssleay + perl-ntlm + perl-package-stash + perl-par-packer + perl-proc-processtable + perl-parse-recdescent + perl-readonly + perl-regexp-common + perl-sys-meminfo + perl-term-readkey + perl-test-deep + perl-test-fatal + perl-test-mock-guard + perl-test-mockobject + perl-test-pod + perl-test-requires + perl-unicode-string + perl-uri + perl-try-tiny)) (arguments - `(#:phases (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) - (invoke "make") #t))) - (delete 'check) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (mkdir-p "./W") ;make install fails unless a W directory exists - (invoke "make" "install" "PREFIX=/" - (string-append "DESTDIR=" out)) #t)))))) + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (invoke "make"))) + (delete 'check) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + ;; Get all input names that start with "perl-" + (perl-inputs (filter (lambda (input) + (string-prefix? "perl-" + (car input))) + inputs))) + ;; Create required directory for make install + (mkdir-p "W") + (invoke "make" "install" "PREFIX=/" + (string-append "DESTDIR=" out)) + ;; Create and wrap the new script + (wrap-program (string-append bin "/imapsync") + `("PERL5LIB" ":" prefix + ,(map (lambda (input) + (string-append (cdr input) + "/lib/perl5/site_perl")) + perl-inputs))))))))) (synopsis "Imapsync is an IMAP transfers tool") (description "Imapsync is an IMAP transfers tool. The purpose of imapsync is to