unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Patterson <ajpatter@uwaterloo.ca>
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	[thread overview]
Message-ID: <20160725010539.26878-4-ajpatter@uwaterloo.ca> (raw)
In-Reply-To: <20160725010539.26878-1-ajpatter@uwaterloo.ca>

* 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 <mhw@netris.org>
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;;
 ;;; 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
-- 
2.9.1

  parent reply	other threads:[~2016-07-25  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25  1:05 [PATCH] gnu: Update ecl Andy Patterson
2016-07-25  1:05 ` [PATCH 1/3] gnu: ecl: Update to 16.1.2 Andy Patterson
2016-07-25  8:25   ` Ludovic Courtès
2016-07-25  1:05 ` [PATCH 2/3] gnu: ecl: Enable tests Andy Patterson
2016-07-25  8:31   ` Ludovic Courtès
2016-07-25  1:05 ` Andy Patterson [this message]
2016-07-25  8:50   ` [PATCH 3/3] gnu: ecl: Wrap with PATH, CPATH, LIBRARY_PATH and LD_LIBRARY_PATH Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160725010539.26878-4-ajpatter@uwaterloo.ca \
    --to=ajpatter@uwaterloo.ca \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).