From patchwork Mon Jul 25 01:05:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Patterson X-Patchwork-Id: 13968 Received: (qmail 20875 invoked by uid 89); 25 Jul 2016 01:06:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Federico, federico, gmp X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 25 Jul 2016 01:06:10 +0000 Received: from localhost ([::1]:58100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRULQ-0001KT-1W for patchwork@sourceware.org; Sun, 24 Jul 2016 21:06:08 -0400 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 Received: from localhost.localdomain ([206.174.179.37]) (authenticated bits=0) by minos.uwaterloo.ca (8.14.4/8.14.4) with ESMTP id u6P15kwW017747 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Sun, 24 Jul 2016 21:05:56 -0400 From: Andy Patterson To: guix-devel@gnu.org 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> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20160725010539.26878-1-ajpatter@uwaterloo.ca> References: <20160725010539.26878-1-ajpatter@uwaterloo.ca> MIME-Version: 1.0 X-UUID: 3a30d0b0-e143-48fd-9634-fe6ec314bbd7 X-MIME-Autoconverted: from 8bit to quoted-printable by minos.uwaterloo.ca id u6P15kwW017747 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 129.97.128.141 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list 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+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" * 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 © 2015 Mark H Weaver ;;; Copyright © 2016 Federico Beffa ;;; Copyright © 2016 ng0 +;;; Copyright © 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 binutils)) + ("libc" ,glibc))) (arguments '(#:tests? #t #:make-flags `(,(string-append "ECL=" @@ -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 as