Alex Vong <alexvong1...@gmail.com> writes: > Federico Beffa <be...@ieee.org> writes: > >> Alex Vong <alexvong1...@gmail.com> 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