This allows for using a package source directly from git, doing something like
(define (command->bytevector command)
(let ((port (apply open-pipe* OPEN_READ command)))
(let ((output (get-bytevector-all port)))
(close-port port)
output)))
(define-public hello-git
(package
(name "hello")
(version "git")
(source (let* ((commit "stable-2.0")
(content (command->bytevector
`("git" "archive" "--format" "tar" "--prefix"
,(string-append commit "/") ,commit)))
(file-name (string-append "hello-" commit)))
(plain-file file-name content)))
...
))
* guix/gexp.scm (<plain-file>): Also allow bytevector content.
(plain-file-compiler): Handle bytevector content.
* doc/guix.texi (G-Expressions): Describe plain-file now also taking
bytevectors.
|
||
|---|---|---|
| .. | ||
| images | ||
| contributing.fr.texi | ||
| contributing.texi | ||
| environment-gdb.scm | ||
| fdl-1.3.texi | ||
| guix.fr.texi | ||
| guix.texi | ||
| htmlxref.cnf | ||
| local.mk | ||
| package-hello.scm | ||