From: ludo@gnu.org (Ludovic Courtès)
To: Kei Kebreau <kei@openmailbox.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add scheme-bytestructures
Date: Mon, 10 Oct 2016 22:46:36 +0200 [thread overview]
Message-ID: <8760p0gcer.fsf@gnu.org> (raw)
In-Reply-To: <87fuo4hz3c.fsf@openmailbox.org> (Kei Kebreau's message of "Mon, 10 Oct 2016 13:51:19 -0400")
Hi Amirouche,
Some comments to complement Kei’s.
Kei Kebreau <kei@openmailbox.org> skribis:
> Amirouche Boubekki <amirouche.boubekki@gmail.com> writes:
>
>> Warning: scheme-bytestructures works on various implementation of Scheme but this patch adds
>> it only for guile-2.0.
>>
>> This is a pure scheme package there is no autotools that's why I use the trivial-build-system.
>>
>> This doesn't run the test suite, yet.
>>
>> From fb2eb7ffd88ec4fba09411195a54b59d67d9c137 Mon Sep 17 00:00:00 2001
>> From: Amirouche <amirouche@hypermove.net>
>> Date: Sun, 9 Oct 2016 12:31:20 +0200
>> Subject: [PATCH] gnu: Add scheme-bytestructures
>>
>> * gnu/packages/guile.scm (scheme-bytestructures): New variable.
>>
>> diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
>> index 0890f19..383990e 100644
>> --- a/gnu/packages/guile.scm
>> +++ b/gnu/packages/guile.scm
>> @@ -1265,4 +1265,105 @@ is no support for parsing block and inline level HTML.")
>> (define-public guile2.2-commonmark
>> (package-for-guile-2.2 guile-commonmark))
>>
>> +(define-public scheme-bytestructures
>> + (package
>> + (name "scheme-bytestructures")
I would suggest calling it “guile-scheme-bytestructures” (or
“guile-bytestructures”?) to distinguish this package from the same one
built for another implementation.
>> + (scm-files (string-split "bytestructures/guile/explicit-endianness.scm
>> +bytestructures/guile/numeric-metadata.scm
>> +bytestructures/guile/ffi.scm
>> +bytestructures/guile/vector.scm
>> +bytestructures/guile/union.scm
>> +bytestructures/guile/numeric-all.scm
>> +bytestructures/guile/utils.scm
>> +bytestructures/guile/pointer.scm
>> +bytestructures/guile/base.scm
>> +bytestructures/guile/numeric.scm
>> +bytestructures/guile/struct.scm
>> +bytestructures/guile/bitfields.scm
>> +bytestructures/r6/bytevectors.scm
>> +bytestructures/body/base.syntactic.scm
>> +bytestructures/body/explicit-endianness.scm
>> +bytestructures/body/vector.scm
>> +bytestructures/body/union.scm
>> +bytestructures/body/utils.scm
>> +bytestructures/body/base.scm
>> +bytestructures/body/numeric.scm
>> +bytestructures/body/struct.scm
>> +bytestructures/body/bitfields.scm
>> +bytestructures/guile.scm"
Please let’s not list all the files. :-) Could it instead use
something like (find-files "bytestructures" "\\.scm$")?
>> + ;; Compile .scm files and install.
>> + (chdir source)
>> + (setenv "GUILE_AUTO_COMPILE" "0")
>> + (for-each (lambda (file)
>> + (let* ((dest-file (string-append module-dir "/"
>> + file))
>> + (go-file (string-append module-dir "/"
>> + (substring file 0
>> + (string-rindex file #\.))
>> + ".go")))
>> + ;; Install source module.
>> + (copy-file file dest-file)
>> + ;; Install compiled module.
>> + (unless (zero? (system* guild "compile"
>> + "-L" source
>> + "-o" go-file
>> + file))
>> + (error (format #f "Failed to compile ~s to ~s!"
>> + file go-file)))))
>> + scm-files)
At some point we should factorize this in a new (guix build guile)
module or something. Any takers? :-)
>> + (license gpl3)))
Probably ‘gpl3+’; could you check?
> I'm getting messages from "./pre-inst-env guix build --check --rounds=2
> scheme-bytestructures" that the package derivation may not be
> deterministic. However, other packages in guile.scm seem to have the
> same issue, so perhaps someone more experienced with this file can
> determine whether this is a cause for concern.
Yeah, this is due to a Guile issue: <http://bugs.gnu.org/20272>.
Thanks
Ludo’.
next prev parent reply other threads:[~2016-10-10 20:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 10:38 [PATCH] Add scheme-bytestructures Amirouche Boubekki
2016-10-10 17:51 ` Kei Kebreau
2016-10-10 20:46 ` Ludovic Courtès [this message]
2016-10-11 13:15 ` Taylan Ulrich Bayırlı/Kammer
2016-10-18 13:14 ` Amirouche Boubekki
2016-10-18 14:27 ` Ludovic Courtès
2016-10-19 7:18 ` Amirouche Boubekki
2016-10-20 14:00 ` Ludovic Courtès
2016-10-20 16:03 ` Amirouche Boubekki
2016-10-24 20:56 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760p0gcer.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=kei@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.