diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index d484c34826..e60570b037 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -1256,9 +1256,9 @@ (define-public burp backup.") (license license:agpl3))) -(define-public disarchive +(define-public guile-disarchive (package - (name "disarchive") + (name "guile-disarchive") (version "0.5.0") (source (origin (method url-fetch) @@ -1290,6 +1290,42 @@ (define-public disarchive compression parameters used by Gzip.") (license license:gpl3+))) +(define-public disarchive + (package/inherit guile-disarchive + (name "disarchive") + (arguments + (list + #:modules `((ice-9 popen) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((effective + (read (open-pipe* OPEN_READ + (string-append #$guile-3.0 "/bin/guile") + "-c" "(write (effective-version))"))) + (scm-dir (string-append "/share/guile/site/" effective)) + (go-dir (string-append "/lib/guile/" effective + "/site-ccache/")) + (modules (list #$output + #$guile-bytestructures + #$guile-gcrypt + #$guile-lzma)) + (scm-path + (map (lambda (module) (string-append module scm-dir)) + modules)) + (go-path + (map (lambda (module) (string-append module scm-dir)) + modules))) + (wrap-program (string-append #$output "/bin/disarchive") + `("PATH" ":" prefix (,(string-append #$output "/bin"))) + `("GUILE_LOAD_PATH" ":" prefix ,scm-path) + `("GUILE_LOAD_COMPILED_PATH" ":" prefix ,go-path)))))))) + (inputs + (list guile-3.0 guile-gcrypt guile-lzma zlib)) + (propagated-inputs (list)))) + (define-public borgmatic (package (name "borgmatic")