gnu: borg: Improve package style.
* gnu/packages/backup.scm (borg)[origin]<snippet>: Use G-expressions. Remove trailing #T. [arguments]: Use G-expressions.
This commit is contained in:
parent
63bb2b965c
commit
bb2701b911
1 changed files with 97 additions and 100 deletions
|
@ -642,11 +642,11 @@ detection, and lossless compression.")
|
|||
(base32 "0q3jwmwwa3jlb02cbkcgh5a9cvwg64vawaypn41bdgpi8ds6hc6p"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
;; Delete files generated by Cython. We used to have a regex
|
||||
;; that created the list of generated files but Borg has
|
||||
;; added new non-generated C files that cause the regex to
|
||||
;; generate the wrong list.
|
||||
#~(begin
|
||||
;; Delete files generated by Cython. We used to have a regex that
|
||||
;; created the list of generated files but Borg has added new
|
||||
;; non-generated C files that cause the regex to generate the
|
||||
;; wrong list.
|
||||
(for-each delete-file
|
||||
'("src/borg/algorithms/checksums.c"
|
||||
"src/borg/chunker.c"
|
||||
|
@ -663,21 +663,21 @@ detection, and lossless compression.")
|
|||
;; Remove bundled shared libraries.
|
||||
(with-directory-excursion "src/borg/algorithms"
|
||||
(for-each delete-file-recursively
|
||||
(list "lz4" "xxh64" "zstd")))
|
||||
#t))))
|
||||
(list "lz4" "xxh64" "zstd")))))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:modules ((srfi srfi-26) ; for cut
|
||||
(list
|
||||
#:modules '((srfi srfi-26) ; for cut
|
||||
(guix build utils)
|
||||
(guix build python-build-system))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'set-env
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((openssl (assoc-ref inputs "openssl"))
|
||||
(lz4 (assoc-ref inputs "lz4"))
|
||||
(xxhash (assoc-ref inputs "xxhash"))
|
||||
(zstd (assoc-ref inputs "zstd")))
|
||||
(let ((openssl #$(this-package-input "openssl"))
|
||||
(lz4 #$(this-package-input "lz4"))
|
||||
(xxhash #$(this-package-input "xxhash"))
|
||||
(zstd #$(this-package-input "zstd")))
|
||||
(setenv "BORG_OPENSSL_PREFIX" openssl)
|
||||
(setenv "BORG_LIBLZ4_PREFIX" lz4)
|
||||
(setenv "BORG_LIBXXHASH_PREFIX" xxhash)
|
||||
|
@ -685,8 +685,7 @@ detection, and lossless compression.")
|
|||
(setenv "PYTHON_EGG_CACHE" "/tmp")
|
||||
;; The test 'test_return_codes[python]' fails when
|
||||
;; HOME=/homeless-shelter.
|
||||
(setenv "HOME" "/tmp")
|
||||
#t)))
|
||||
(setenv "HOME" "/tmp"))))
|
||||
;; The tests need to be run after Borg is installed.
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
|
@ -722,10 +721,9 @@ detection, and lossless compression.")
|
|||
"and not test_fuse_versions_view "
|
||||
"and not test_migrate_lock_alive"))))))
|
||||
(add-after 'install 'install-doc
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(man (string-append out "/share/man/man1"))
|
||||
(misc (string-append out "/share/borg/misc")))
|
||||
(lambda _
|
||||
(let ((man (string-append #$output "/share/man/man1"))
|
||||
(misc (string-append #$output "/share/borg/misc")))
|
||||
(for-each (cut install-file <> misc)
|
||||
'("docs/misc/create_chunker-params.txt"
|
||||
"docs/misc/borg-data-flow.png"
|
||||
|
@ -733,10 +731,9 @@ detection, and lossless compression.")
|
|||
"docs/misc/prune-example.txt"))
|
||||
(copy-recursively "docs/man" man))))
|
||||
(add-after 'install-docs 'install-shell-completions
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(etc (string-append out "/etc"))
|
||||
(share (string-append out "/share")))
|
||||
(lambda _
|
||||
(let ((etc (string-append #$output "/etc"))
|
||||
(share (string-append #$output "/share")))
|
||||
(with-directory-excursion "scripts/shell_completions"
|
||||
(install-file "bash/borg"
|
||||
(string-append etc "/bash_completion.d"))
|
||||
|
@ -755,8 +752,8 @@ detection, and lossless compression.")
|
|||
;; FUSE 3 isn't working well, so we stick with FUSE 2 for now:
|
||||
;; <https://issues.guix.gnu.org/53407>
|
||||
python-llfuse
|
||||
`(,zstd "lib")
|
||||
xxhash))
|
||||
xxhash
|
||||
`(,zstd "lib")))
|
||||
(synopsis "Deduplicated, encrypted, authenticated and compressed backups")
|
||||
(description "Borg is a deduplicating backup program. Optionally, it
|
||||
supports compression and authenticated encryption. The main goal of Borg is to
|
||||
|
|
Reference in a new issue