From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: [PATCH 2/3] gnu: Add scm. Date: Sun, 26 Feb 2017 20:42:27 +0100 Message-ID: <1488138148-24017-2-git-send-email-jmd@gnu.org> References: <1488138148-24017-1-git-send-email-jmd@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci4iW-0002qn-5T for guix-devel@gnu.org; Sun, 26 Feb 2017 14:42:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci4iR-0000tW-EV for guix-devel@gnu.org; Sun, 26 Feb 2017 14:42:48 -0500 In-Reply-To: <1488138148-24017-1-git-send-email-jmd@gnu.org> 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 Cc: John Darrington * gnu/packages/scheme.scm (scm): New variable. --- gnu/packages/scheme.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 5134c24..cd3fb5b 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -882,3 +882,64 @@ utility functions for all standard Scheme implementations.") "http://people.csail.mit.edu/jaffer/SLIB_COPYING.txt" "Or see COPYING in the distribution.")))) +(define-public scm + (package + (name "scm") + (version "5f2") + (source (origin + (method url-fetch) + (uri (string-append + "http://groups.csail.mit.edu/mac/ftpdir/scm/scm-" + version ".zip")) + (sha256 + (base32 + "050ijb51jm1cij9g3r89zl9rawsrikhbb5y8zb7lspb7bsxq5w99")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (zero? (system* "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")))))) + (add-before 'build 'pre-build + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("ginstall-info") "install-info")))) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (setenv "SCHEME_LIBRARY_PATH" + (string-append (assoc-ref inputs "slib") + "/lib/slib/")) + (and + (zero? (system* "make" "scmlit" "CC=gcc")) + (zero? (system* "make" "all"))))) + (add-after 'install 'post-install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((req + (string-append (assoc-ref outputs "out") + "/lib/scm/require.scm"))) + (and + (delete-file req) + (format (open req (logior O_WRONLY O_CREAT)) + "(define (library-vicinity) ~s)\n" + (string-append (assoc-ref inputs "slib") + "/lib/slib/")) + + ;; We must generate the slibcat file + (zero? (system* + (string-append + (assoc-ref outputs "out") + "/bin/scm") + "-br" "new-catalog"))))))))) + (inputs `(("slib" ,slib))) + (native-inputs `(("unzip" ,unzip) + ("texinfo" ,texinfo))) + (home-page "http://people.csail.mit.edu/jaffer/SCM") + (synopsis "Scheme implementation conforming to R5RS and IEEE P1178") + (description "GNU SCM is an implementation of Scheme. This +implementation includes Hobbit, a Scheme-to-C compiler, which can +generate C files whose binaries can be dynamically or statically +linked with a SCM executable.") + (license lgpl3+))) -- 2.1.4