From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: Add scmutils.
Date: Thu, 17 Sep 2015 15:03:08 +0200 [thread overview]
Message-ID: <87a8slb3lf.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPO2UZMZTYNdi9gjA846xu-8-i2nVmxMCO1haQyEU3AWzQ@mail.gmail.com> (Federico Beffa's message of "Tue, 15 Sep 2015 19:34:20 +0200")
Federico Beffa <beffa@ieee.org> skribis:
> From 1aacd03326def7b52b8166a80cc18c8e8226aa62 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Thu, 13 Aug 2015 18:58:01 +0200
> Subject: [PATCH] gnu: Add scmutils.
>
> * gnu/packages/scheme.scm (scmutils): New variable.
Overall LGTM. The comments below are largely cosmetic:
> +;; FIXME: This function is temporarily in the engineering module and not
> +;; exported. It will be moved to an utility module for general use. Once
> +;; this is done, we should remove this definition.
> +(define broken-tarball-fetch
> + (@@ (gnu packages engineering) broken-tarball-fetch))
Not important for this patch, but eventually we could always make a
(guix tarbomb-fetch) module that would export this procedure.
> + (modify-phases %standard-phases
Since the phases are nontrivial, I would suggest adding a comment right
before the ‘lambda*’ line of each phase to briefly mention what it does.
> + (add-before 'install 'fix-bin
Maybe ‘fix-directory-names’?
> + (lambda* (#:key outputs #:allow-other-keys)
> + (define* (copy-files-to-directory files dir
> + #:optional (delete? #f))
> + (for-each (lambda (f)
> + (copy-file f (string-append dir "/" f))
Note for later: once ‘core-updates’ is merged, we should write this as:
(install-file f dir)
> + (when delete? (delete-file f)))
> + files))
> +
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (doc (string-append out "/share/doc/"
> + ,name "-" ,version))
> + (lib (string-append out "/lib/mit-scheme-"
> + ,(system-suffix)
> + "/scmutils")))
> + (for-each (lambda (d) (mkdir-p d)) (list lib doc bin))
This can be written as:
(for-each mkdir-p (list …))
> + (with-directory-excursion "scmutils/scmutils"
> + (copy-files-to-directory '("COPYING" "LICENSE")
> + doc #t)
> + (for-each (lambda (f) (delete-file f))
> + (find-files "." "\\.bin"))
(for-each delete-file (find-files …))
This phase deletes a bunch of pre-compiled files, which are those Mark
and you were referring to, IIUC. Could you move the removal of all the
pre-compiled files to a ‘snippet’?
This will ensure that ‘guix build -S scmutils’ provides only source code.
> + (emacs-lisp-dir
> + (string-append out "/share/emacs/site-lisp"))
This should be:
(string-append out "/share/emacs/site-lisp/guix.d/" ,name "-" ,version)
That way, when installing the package from Emacs, it will automatically
be found and loaded (I realize the manual doesn’t explain it, but it
probably should.)
> + (supported-systems '("x86_64-linux" "i686-linux"))
Please add a comment above explaining why this is the case.
> + (synopsis "The Scmutils library for MIT Scheme")
-The
Well, this was not an easy package. Thanks for working on it!
Ludo’.
next prev parent reply other threads:[~2015-09-17 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 17:34 [PATCH] gnu: Add scmutils Federico Beffa
2015-09-16 1:59 ` Mark H Weaver
2015-09-16 6:30 ` Federico Beffa
2015-09-17 13:03 ` Ludovic Courtès [this message]
2015-09-17 16:19 ` Federico Beffa
2015-09-17 19:54 ` 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=87a8slb3lf.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.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.