Jan Nieuwenhuizen
e8e1f295f1
gexp: Allow bytevector as content of `plain-file'.
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.
2018-07-12 06:22:04 +02:00
..
2016-12-17 14:46:42 +01:00
2018-06-23 16:23:50 +02:00
2018-07-04 14:36:07 +02:00
2015-06-29 23:08:36 +02:00
2012-10-13 16:05:01 +02:00
2018-06-23 16:23:50 +02:00
2018-07-12 06:22:04 +02:00
2018-07-05 22:16:10 +02:00
2018-04-29 21:42:14 +02:00
2015-09-14 23:10:58 +02:00