From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Patterson Subject: [PATCH 3/3] gnu: ecl: Wrap with PATH, CPATH, LIBRARY_PATH and LD_LIBRARY_PATH Date: Sun, 24 Jul 2016 21:05:39 -0400 Message-ID: <20160725010539.26878-4-ajpatter@uwaterloo.ca> References: <20160725010539.26878-1-ajpatter@uwaterloo.ca> 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]:53848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRULH-0001JT-Fn for guix-devel@gnu.org; Sun, 24 Jul 2016 21:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRULF-0005wA-G0 for guix-devel@gnu.org; Sun, 24 Jul 2016 21:05:58 -0400 Received: from mailservices.uwaterloo.ca ([129.97.128.141]:52865 helo=minos.uwaterloo.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRULF-0005w6-9B for guix-devel@gnu.org; Sun, 24 Jul 2016 21:05:57 -0400 In-Reply-To: <20160725010539.26878-1-ajpatter@uwaterloo.ca> 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: guix-devel@gnu.org * gnu/packages/lisp.scm (ecl)[arguments]: Wrap with PATH, CPATH, LIBRARY_PATH and LD_LIBRARY_PATH --- gnu/packages/lisp.scm | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 1c7a791..8769410 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2015 Mark H Weaver ;;; Copyright =C2=A9 2016 Federico Beffa ;;; Copyright =C2=A9 2016 ng0 +;;; Copyright =C2=A9 2016 Andy Patterson ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,10 +34,12 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages base) + #:use-module (gnu packages gcc) #:use-module (gnu packages multiprecision) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages libffi) #:use-module (gnu packages libffcall) + #:use-module (gnu packages linux) #:use-module (gnu packages readline) #:use-module (gnu packages libsigsegv) #:use-module (gnu packages admin) @@ -117,7 +120,12 @@ interface to the Tk widget system.") (inputs `(("gmp" ,gmp) ("libatomic-ops" ,libatomic-ops) ("libgc" ,libgc) - ("libffi" ,libffi))) + ("libffi" ,libffi) + ("linux-headers" ,linux-libre-headers) + ("gcc" ,gcc) + ("binutils" ,binutils) + ("ld-wrapper" ,(make-ld-wrapper "ld-wrapper" #:binutils bi= nutils)) + ("libc" ,glibc))) (arguments '(#:tests? #t #:make-flags `(,(string-append "ECL=3D" @@ -127,7 +135,28 @@ interface to the Tk widget system.") #:phases (modify-phases %standard-phases (delete 'check) - (add-after 'install 'check (assoc-ref %standard-phases 'check))= ))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((ecl (assoc-ref outputs "out")) + (input-path (lambda (lib path) + (string-append + (assoc-ref inputs lib) path))) + (libraries '("gmp" "libatomic-ops" "libgc" "libffi" = "libc")) + (binaries '("gcc" "binutils" "ld-wrapper")) + (library-directories + (map (lambda (lib) (input-path lib "/lib")) + libraries))) + + (wrap-program (string-append ecl "/bin/ecl") + `("PATH" prefix + ,(map (lambda (binary) (input-path binary "/bin")) + binaries)) + `("CPATH" suffix + ,(map (lambda (lib) (input-path lib "/include")) + `("linux-headers" ,@libraries))) + `("LIBRARY_PATH" suffix ,library-directories) + `("LD_LIBRARY_PATH" suffix ,library-directories))))) + (add-after 'wrap 'check (assoc-ref %standard-phases 'check))))) (home-page "http://ecls.sourceforge.net/") (synopsis "Embeddable Common Lisp") (description "ECL is an implementation of the Common Lisp language a= s --=20 2.9.1