From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: Add clojure. Date: Sat, 27 Feb 2016 12:51:56 +0100 Message-ID: <87k2lqe5gj.fsf@mdc-berlin.de> References: <87h9gvn0rr.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZdPv-0003pp-HX for guix-devel@gnu.org; Sat, 27 Feb 2016 06:52:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZdPq-0000gl-Hg for guix-devel@gnu.org; Sat, 27 Feb 2016 06:52:11 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:39166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZdPq-0000ga-5N for guix-devel@gnu.org; Sat, 27 Feb 2016 06:52:06 -0500 In-Reply-To: <87h9gvn0rr.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Vong Cc: Guix-devel , Federico Beffa Alex Vong writes: > Federico Beffa writes: > >> Alex Vong 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-n= ame) >>> + "--strip-components=3D1= ")))))) >>> + (copy (lambda (src-name) >>> + (copy-recursively >>> + (string-append src-name "/src/main/cloju= re/") >>> + (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 phas= e > 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 =E2=80=9Cant-build-syste= m=E2=80=9D, which is almost ready. This is not a blocker, of course =E2=80=94 I just= want to warn you that I might submit patches to change your clojure recipe once the =E2=80=9Cant-build-system=E2=80=9D is merged.) ~~ Ricardo