gnu: lxd: Update to 4.22.

* gnu/packages/virtualization.scm (lxd): Update to 4.22.
[arguments]: Don't explicitly return #t from phases.
This commit is contained in:
Tobias Geerinckx-Rice 2022-01-16 01:00:03 +01:00
parent 2445f78085
commit d6f890a471
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -1135,7 +1135,7 @@ (define-public lxcfs
(define-public lxd (define-public lxd
(package (package
(name "lxd") (name "lxd")
(version "4.17") (version "4.22")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
@ -1143,7 +1143,7 @@ (define-public lxd
"lxd-" version "/lxd-" version ".tar.gz")) "lxd-" version "/lxd-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1kzmgyg5kw3zw9qa6jabld6rmb53b6yy69h7y9znsdlf74jllljl")))) "119345936fcm1vv06k82k9hvj5yjf9jdrwqm9ccphhl5mswf8xq9"))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
`(#:import-path "github.com/lxc/lxd" `(#:import-path "github.com/lxc/lxd"
@ -1157,22 +1157,17 @@ (define-public lxd
(add-after 'unpack 'unpack-dist (add-after 'unpack 'unpack-dist
(lambda* (#:key import-path #:allow-other-keys) (lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path) (with-directory-excursion (string-append "src/" import-path)
;; remove the link back to the top level ;; Move all the dependencies into the src directory.
(delete-file (string-append "_dist/src/" import-path)) (copy-recursively "_dist/src" "../../.."))))
;; move all the deps into the src directory
(copy-recursively "_dist/src" "../../.."))
#t))
(replace 'build (replace 'build
(lambda* (#:key import-path #:allow-other-keys) (lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path) (with-directory-excursion (string-append "src/" import-path)
(invoke "make" "build" "CC=gcc" "TAG_SQLITE3=libsqlite3") (invoke "make" "build" "CC=gcc" "TAG_SQLITE3=libsqlite3"))))
#t)))
(replace 'check (replace 'check
(lambda* (#:key tests? import-path #:allow-other-keys) (lambda* (#:key tests? import-path #:allow-other-keys)
(when tests? (when tests?
(with-directory-excursion (string-append "src/" import-path) (with-directory-excursion (string-append "src/" import-path)
(invoke "make" "check" "CC=gcc" "TAG_SQLITE3=libsqlite3"))) (invoke "make" "check" "CC=gcc" "TAG_SQLITE3=libsqlite3")))))
#t))
(replace 'install (replace 'install
(lambda* (#:key inputs outputs import-path #:allow-other-keys) (lambda* (#:key inputs outputs import-path #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
@ -1183,7 +1178,7 @@ (define-public lxd
(completions-dir (completions-dir
(string-append out "/share/bash-completion/completions"))) (string-append out "/share/bash-completion/completions")))
(with-directory-excursion (string-append "src/" import-path) (with-directory-excursion (string-append "src/" import-path)
;; wrap lxd with runtime dependencies ;; Wrap lxd with run-time dependencies.
(wrap-program (string-append bin-dir "lxd") (wrap-program (string-append bin-dir "lxd")
`("PATH" ":" prefix `("PATH" ":" prefix
,(fold (lambda (input paths) ,(fold (lambda (input paths)
@ -1196,20 +1191,19 @@ (define-public lxd
'("bash" "acl" "rsync" "tar" "xz" "btrfs-progs" '("bash" "acl" "rsync" "tar" "xz" "btrfs-progs"
"gzip" "dnsmasq" "squashfs-tools" "iproute2" "gzip" "dnsmasq" "squashfs-tools" "iproute2"
"criu" "iptables")))) "criu" "iptables"))))
;; remove unwanted binaries ;; Remove unwanted binaries.
(for-each (lambda (prog) (for-each (lambda (prog)
(delete-file (string-append bin-dir prog))) (delete-file (string-append bin-dir prog)))
'("deps" "macaroon-identity" "generate")) '("deps" "macaroon-identity" "generate"))
;; install documentation ;; Install documentation.
(for-each (lambda (file) (for-each (lambda (file)
(install-file file doc-dir)) (install-file file doc-dir))
(find-files "doc")) (find-files "doc"))
;; install bash completion ;; Install bash completion.
(rename-file "scripts/bash/lxd-client" "scripts/bash/lxd") (rename-file "scripts/bash/lxd-client" "scripts/bash/lxd")
(install-file "scripts/bash/lxd" completions-dir))) (install-file "scripts/bash/lxd" completions-dir))))))))
#t)))))
(native-inputs (native-inputs
(list ;; test dependencies: (list ;; Test dependencies:
;; ("go-github-com-rogpeppe-godeps" ,go-github-com-rogpeppe-godeps) ;; ("go-github-com-rogpeppe-godeps" ,go-github-com-rogpeppe-godeps)
;; ("go-github-com-tsenart-deadcode" ,go-github-com-tsenart-deadcode) ;; ("go-github-com-tsenart-deadcode" ,go-github-com-tsenart-deadcode)
;; ("go-golang-org-x-lint" ,go-golang-org-x-lint) ;; ("go-golang-org-x-lint" ,go-golang-org-x-lint)
@ -1221,7 +1215,7 @@ (define-public lxd
("libraft" ,libraft) ("libraft" ,libraft)
("libcap" ,libcap) ("libcap" ,libcap)
("lxc" ,lxc) ("lxc" ,lxc)
;; runtime dependencies: ;; Run-time dependencies.
("bash" ,bash-minimal) ("bash" ,bash-minimal)
("rsync" ,rsync) ("rsync" ,rsync)
("tar" ,tar) ("tar" ,tar)