From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 3/3] gnu: Add khmer. Date: Fri, 17 Jun 2016 03:23:58 -0400 Message-ID: <20160617072358.GA3618@jasmine> References: <1466126601-30932-1-git-send-email-donttrustben@gmail.com> <1466126601-30932-4-git-send-email-donttrustben@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDo8T-0000N9-MD for Guix-devel@gnu.org; Fri, 17 Jun 2016 03:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDo8N-0001ix-NY for Guix-devel@gnu.org; Fri, 17 Jun 2016 03:24:12 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDo8M-0001iB-Dm for Guix-devel@gnu.org; Fri, 17 Jun 2016 03:24:07 -0400 Content-Disposition: inline In-Reply-To: <1466126601-30932-4-git-send-email-donttrustben@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" To: Ben Woodcroft Cc: Guix-devel@gnu.org On Fri, Jun 17, 2016 at 11:23:21AM +1000, Ben Woodcroft wrote: > + (build-system python-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'set-paths This phase deletes bundled libraries and then copies one of the libraries back in from another package (murmur-hash). Can khmer refer to murmur-hash without it being bundled at all? > + (lambda* (#:key inputs outputs #:allow-other-keys) > + ;; Delete bundled libraries. > + (delete-file-recursively "third-party/zlib") > + (delete-file-recursively "third-party/bzip2") > + ;; Replace bundled seqan. > + (let* ((seqan-all "third-party/seqan") > + (seqan-include (string-append > + seqan-all "/core/include/seqan"))) > + (delete-file-recursively seqan-all) > + (mkdir-p seqan-include) > + (rmdir seqan-include) Here it makes the directory seqan-include and then removes it. Should it be reversed? Would it be simpler to delete the directory and then use copy-recursively, which I don't think requires mkdir-p? > + (copy-file (string-append (assoc-ref inputs "seqan") > + "/include/seqan") > + seqan-include)) > + ;; Replace bundled MurmurHash. > + (let ((smhasher "third-party/smhasher/")) > + (delete-file-recursively smhasher) > + (mkdir smhasher) > + (for-each > + (lambda (file) > + (copy-file > + (string-append > + (assoc-ref inputs "murmur-hash") "/include/" file) > + (string-append smhasher file))) > + (list "MurmurHash3.cpp" "MurmurHash3.h")) > + (rename-file > + (string-append smhasher "MurmurHash3.cpp") > + (string-append smhasher "MurmurHash3.cc"))) > + (setenv "CC" "gcc") I think this variable setting should be in its own phase.