Add a `base32' macro, for convenience.
* guix/packages.scm (base32): New macro. * distro/base.scm (libsigsegv, gawk, hello): Use it.master
parent
03671375b6
commit
e4c245f8a5
|
@ -36,8 +36,7 @@
|
||||||
(method http-fetch)
|
(method http-fetch)
|
||||||
(uri "http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz")
|
(uri "http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz")
|
||||||
(sha256
|
(sha256
|
||||||
(nix-base32-string->bytevector ; TODO: make conversion implicit
|
(base32 "16hrs8k3nmc7a8jam5j1fpspd6sdpkamskvsdpcw6m29vnis8q44"))))
|
||||||
"16hrs8k3nmc7a8jam5j1fpspd6sdpkamskvsdpcw6m29vnis8q44"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(outputs '("out" "lib")) ; separate libdir from the rest
|
(outputs '("out" "lib")) ; separate libdir from the rest
|
||||||
(home-page "http://www.gnu.org/software/libsigsegv/")
|
(home-page "http://www.gnu.org/software/libsigsegv/")
|
||||||
|
@ -59,8 +58,7 @@ handlers, distributed shared memory, and more.")
|
||||||
(method http-fetch)
|
(method http-fetch)
|
||||||
(uri "http://ftp.gnu.org/gnu/gawk/gawk-4.0.0.tar.bz2")
|
(uri "http://ftp.gnu.org/gnu/gawk/gawk-4.0.0.tar.bz2")
|
||||||
(sha256
|
(sha256
|
||||||
(nix-base32-string->bytevector
|
(base32 "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
|
||||||
"0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments (case-lambda
|
(arguments (case-lambda
|
||||||
((system)
|
((system)
|
||||||
|
@ -94,8 +92,7 @@ code.")
|
||||||
(method http-fetch)
|
(method http-fetch)
|
||||||
(uri "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
|
(uri "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
|
||||||
(sha256
|
(sha256
|
||||||
(nix-base32-string->bytevector ; TODO: make conversion implicit
|
(base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
|
||||||
"0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments '(#:configure-flags
|
(arguments '(#:configure-flags
|
||||||
`("--disable-dependency-tracking"
|
`("--disable-dependency-tracking"
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
package-source-method
|
package-source-method
|
||||||
package-source-sha256
|
package-source-sha256
|
||||||
package-source-file-name
|
package-source-file-name
|
||||||
|
base32
|
||||||
|
|
||||||
package
|
package
|
||||||
package?
|
package?
|
||||||
|
@ -102,6 +103,17 @@ etc."
|
||||||
(file-name package-source-file-name ; optional file name
|
(file-name package-source-file-name ; optional file name
|
||||||
(default #f)))
|
(default #f)))
|
||||||
|
|
||||||
|
(define-syntax base32
|
||||||
|
(lambda (s)
|
||||||
|
"Return the bytevector corresponding to the given Nix-base32
|
||||||
|
representation."
|
||||||
|
(syntax-case s ()
|
||||||
|
((_ str)
|
||||||
|
(string? (syntax->datum #'str))
|
||||||
|
(with-syntax ((bv (nix-base32-string->bytevector
|
||||||
|
(syntax->datum #'str))))
|
||||||
|
#''bv)))))
|
||||||
|
|
||||||
;; A package.
|
;; A package.
|
||||||
(define-record-type* <package>
|
(define-record-type* <package>
|
||||||
package make-package
|
package make-package
|
||||||
|
|
Reference in New Issue