guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Add clojure.


From: Ricardo Wurmus
Subject: Re: [PATCH] gnu: Add clojure.
Date: Sat, 27 Feb 2016 12:51:56 +0100
User-agent: mu4e 0.9.13; emacs 24.5.1

Alex Vong <address@hidden> writes:

> Federico Beffa <address@hidden> writes:
>
>> Alex Vong <address@hidden> writes:
>>
>>> +       #:phases
>>> +       (modify-phases %standard-phases
>>> +         (delete 'configure)
>>> +         (replace 'unpack
>>> +           (lambda _
>>> +             (and (mkdir "clojure/")
>>> +                  (zero? (system* "unzip"
>>> +                                  "-d" "clojure/"
>>> +                                  (assoc-ref %build-inputs "source")))
>>> +                  (chdir "clojure/"))))
>>
>> The return value of 'mkdir' and 'chdir' is unspecified.  Therefore it
>> should not be used.
>>
>>> +         (add-after 'remove-jar 'unpack-submodule-sources
>>> +           (lambda* (#:key inputs #:allow-other-keys)
>>> +             (let ((unpack
>>> +                    (lambda (src-name)
>>> +                      (and (mkdir src-name)
>>> +                           (with-directory-excursion src-name
>>> +                             (zero? (system* "tar"
>>> +                                             "zxvf"
>>> +                                             (assoc-ref inputs src-name)
>>> +                                             "--strip-components=1"))))))
>>> +                   (copy (lambda (src-name)
>>> +                           (copy-recursively
>>> +                            (string-append src-name "/src/main/clojure/")
>>> + (string-append "clojure-" ,version "/src/clj/")))))
>>> +               (every (lambda (src)
>>> +                        (begin (unpack src)
>>> +                               (copy src)))
>>> +                      '("data-generators-src" "java-classpath-src"
>>> +                        "test-check-src" "test-generative-src"
>>> +                        "tools-namespace-src" "tools-reader-src")))))
>>
>> Same.
>>
>
> Fixed!
>
> In addition, I've made some minor changes, including adding CPL1.0 to
> the license list and removing zip archives in the 'remove-binaries phase
> and so on...

Actually, I think it would be better to remove the archives in a snippet
instead of doing this in a build phase.  For the additional origins
snippets may also be used to remove binaries (if necessary).

(It looks like this could be simplified with the “ant-build-system”,
which is almost ready.  This is not a blocker, of course — I just want
to warn you that I might submit patches to change your clojure recipe
once the “ant-build-system” is merged.)

~~ Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]