GNU bug report logs -
#32116
Allow bytevector as content of plain-file for binary data.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32116 in the body.
You can then email your comments to 32116 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#32116
; Package
guix-patches
.
(Tue, 10 Jul 2018 17:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 10 Jul 2018 17:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Currently, plain-file does not handle binary content correctly. As discussed
on IRC[0] I added bytevector support to plain-file.
This allows for using a package source directly from git, doing something like
--8<---------------cut here---------------start------------->8---
(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)))
...
))
--8<---------------cut here---------------end--------------->8---
Greetings,
janneke
[0] https://gnunet.org/bot/log/guix/2018-07-10#T1763807
Merged 32116 32117.
Request was from
Jan Nieuwenhuizen <janneke <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Jul 2018 18:04:02 GMT)
Full text and
rfc822 format available.
Merged 32116 32117 32118.
Request was from
Jan Nieuwenhuizen <janneke <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Jul 2018 18:04:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#32116
; Package
guix-patches
.
(Wed, 11 Jul 2018 22:10:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 32116 <at> debbugs.gnu.org (full text, mbox):
Hello,
Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:
> * guix/store.scm (binary-file): New function.
> * doc/guix.texi (G-Expressions): Describe binary-file*.
[...]
> +@deffn {Monadic Procedure} binary-file* @var{name} @var{data} @dots{}
There’s no ‘*’ in the actual procedure name.
Also, could you move this @deffn to “The Store Monad”, right after
‘text-file’?
Apart from that it LGTM, thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#32116
; Package
guix-patches
.
(Wed, 11 Jul 2018 22:11:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 32116 <at> debbugs.gnu.org (full text, mbox):
Hello,
Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:
> * guix/store.scm (binary-file): New function.
> * doc/guix.texi (G-Expressions): Describe binary-file*.
[...]
> +@deffn {Monadic Procedure} binary-file* @var{name} @var{data} @dots{}
There’s no ‘*’ in the actual procedure name.
Also, could you move this @deffn to “The Store Monad”, right after
‘text-file’?
Apart from that it LGTM, thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#32116
; Package
guix-patches
.
(Wed, 11 Jul 2018 22:12:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 32116 <at> debbugs.gnu.org (full text, mbox):
Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:
> 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.
LGTM, thanks!
Ludo'.
Reply sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
You have taken responsibility.
(Thu, 12 Jul 2018 04:31:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
bug acknowledged by developer.
(Thu, 12 Jul 2018 04:31:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 32116-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
>> +@deffn {Monadic Procedure} binary-file* @var{name} @var{data} @dots{}
>
> There’s no ‘*’ in the actual procedure name.
>
> Also, could you move this @deffn to “The Store Monad”, right after
> ‘text-file’?
Ah, I based this on the `text-file*' description! Moved, and rewritten
as
@deffn {Monadic Procedure} binary-file @var{name} @var{data} [@var{references}]
Return as a monadic value the absolute file name in the store of the file
containing @var{data}, a bytevector. @var{references} is a list of store
items that the resulting binary file refers to; it defaults to the empty list.
@end deffn
> Apart from that it LGTM, thanks!
Pushed to master as f3a422511f793fb6c6cfeec2bb8735965a03294a
janneke
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
Reply sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
You have taken responsibility.
(Thu, 12 Jul 2018 04:31:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
bug acknowledged by developer.
(Thu, 12 Jul 2018 04:31:03 GMT)
Full text and
rfc822 format available.
Reply sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
You have taken responsibility.
(Thu, 12 Jul 2018 04:31:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jan Nieuwenhuizen <janneke <at> gnu.org>
:
bug acknowledged by developer.
(Thu, 12 Jul 2018 04:31:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#32116
; Package
guix-patches
.
(Thu, 12 Jul 2018 04:32:01 GMT)
Full text and
rfc822 format available.
Message #36 received at 32116-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
>> * 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.
>
> LGTM, thanks!
Pushed to master as e8e1f295f15fa56660a2c460d422795b1a31bed8
janneke
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 09 Aug 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.