guix-devel/doc
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
..
images doc: Update dot graphs. 2016-12-17 14:46:42 +01:00
contributing.fr.texi nls: Update 'fr' translation. 2018-06-23 16:23:50 +02:00
contributing.texi doc: Mention the build environment. 2018-07-04 14:36:07 +02:00
environment-gdb.scm doc: Add 'guix environment' examples. 2015-06-29 23:08:36 +02:00
fdl-1.3.texi doc: Add the stub of a manual. 2012-10-13 16:05:01 +02:00
guix.fr.texi nls: Update 'fr' translation. 2018-06-23 16:23:50 +02:00
guix.texi gexp: Allow bytevector as content of `plain-file'. 2018-07-12 06:22:04 +02:00
htmlxref.cnf doc: Update URL of the Emacs-Guix manual. 2018-07-05 22:16:10 +02:00
local.mk build: Use only one domain for guix-manual. 2018-04-29 21:42:14 +02:00
package-hello.scm doc: Use the recommended Scheme format. 2015-09-14 23:10:58 +02:00