gnu: inxi: Use GIT-FETCH.

* gnu/packages/admin.scm (inxi)[source]: Use GIT-FETCH.
[native-inputs]: Remove tar.
[arguments]: Adjust accordingly.
This commit is contained in:
Tobias Geerinckx-Rice 2018-06-06 03:20:08 +02:00
parent 55f5556e24
commit b740a30527
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -2655,10 +2655,10 @@ (define-public inxi-minimal
(version "3.0.04-1")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/smxi/inxi"
"/archive/" version "/inxi.tar.gz"))
(file-name (string-append real-name "-" version ".tar.gz"))
(method git-fetch)
(uri (git-reference
(url "https://github.com/smxi/inxi")
(commit version)))
(sha256
(base32
"14zxdsjgh9dbijmpp0hhvg2yiqqfwnqgcc6x8dpl1v15z1h1r7pc"))))
@ -2667,8 +2667,7 @@ (define-public inxi-minimal
`(("bash" ,bash)
("perl" ,perl)))
(native-inputs
`(("gzip" ,gzip)
("tar" ,tar)))
`(("gzip" ,gzip)))
(arguments
`(#:modules
((guix build utils)
@ -2682,9 +2681,9 @@ (define-public inxi-minimal
(setenv "PATH" (string-append
(assoc-ref %build-inputs "bash") "/bin" ":"
(assoc-ref %build-inputs "gzip") "/bin" ":"
(assoc-ref %build-inputs "perl") "/bin" ":"
(assoc-ref %build-inputs "tar") "/bin" ":"))
(invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
(assoc-ref %build-inputs "perl") "/bin" ":"))
(copy-recursively (assoc-ref %build-inputs "source")
,(string-append real-name "-" version))
(with-directory-excursion ,(string-append real-name "-" version)
(with-fluids ((%default-port-encoding #f))
(substitute* "inxi" (("/usr/bin/env perl") (which "perl"))))