From: Federico Beffa <beffa@ieee.org>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: Add chez-scmutils.
Date: Sat, 22 Oct 2016 11:04:11 +0200 [thread overview]
Message-ID: <CAKrPhPM-JB1sOJ3aOSg9qPqYu6iUXFwnLZLD8HwdifE+5-0ztw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-gnu-Add-chez-scmutils.patch --]
[-- Type: text/x-patch, Size: 3812 bytes --]
From 17cbca3cee22885f2f5ac9fb569778572c844748 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Sat, 22 Oct 2016 10:58:32 +0200
Subject: [PATCH] gnu: Add chez-scmutils.
* gnu/packages/chez.scm (chez-scmutils): New variable.
---
gnu/packages/chez.scm | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 91593d3..ce60e46 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -499,3 +499,69 @@ libraries for Chez Scheme. The main goal was to provide the
functionality required to port the program 'Scmutils' to Chez
Scheme.")
(license gpl3+)))
+
+(define-public chez-scmutils
+ (package
+ (name "chez-scmutils")
+ (version "0.1")
+ (home-page "https://github.com/fedeinthemix/chez-scmutils")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append home-page "/archive/v" version ".tar.gz"))
+ (sha256
+ (base32 "1a5j61pggaiwl1gl6m038rcy5n8r2sj5nyjmz86jydx97mm5i8hj"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("chez-srfi" ,chez-srfi))) ; for tests
+ (native-inputs
+ `(("chez-scheme" ,chez-scheme)))
+ (propagated-inputs
+ `(("chez-mit" ,chez-mit)
+ ("chez-srfi" ,chez-srfi)))
+ (arguments
+ `(#:make-flags ,(chez-make-flags name version)
+ #:tests? #f ; no test suite
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure ,chez-configure)
+ ;; Since the documentation is lacking, we install the source
+ ;; code. For things to work correctly we have to replace
+ ;; relative paths by absolute ones in 'include' forms. This
+ ;; in turn requires us to compile the files in the final
+ ;; destination.
+ (delete 'build)
+ (add-after 'install 'install-src
+ (lambda* (#:key (make-flags '()) #:allow-other-keys)
+ (zero? (apply system* "make" "install-src" make-flags))))
+ (add-after 'install-src 'absolute-path-in-scm-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each (lambda (file)
+ (substitute* file
+ (("include +\"\\./scmutils")
+ (string-append "include \"" (dirname file)))))
+ (find-files out "\\.sls"))
+ (for-each (lambda (file)
+ (substitute* file
+ (("include +\"\\./scmutils/simplify")
+ (string-append "include \"" (dirname file)))))
+ (find-files out "fbe-syntax\\.scm"))
+ #t)))
+ (add-after 'absolute-path-in-scm-files 'build
+ (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (mk-file (car (find-files out "Makefile"))))
+ (with-directory-excursion (dirname mk-file)
+ (zero? (apply system* "make" "build" make-flags))))))
+ (add-after 'build 'clean-up
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (for-each delete-file
+ (find-files out "Makefile|compile-all\\.ss"))))))))
+ (synopsis "Port of MIT/GNU Scheme Scmutils to Chez Scheme")
+ (description "This package provides a port of the MIT/GNU Scheme
+Scmutils program to Chez Scheme. The port consists of a set of
+libraries providing most of the functionality of the original.")
+ (license gpl3+)))
--
2.7.4
next reply other threads:[~2016-10-22 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 9:04 Federico Beffa [this message]
2016-10-24 21:31 ` [PATCH] gnu: Add chez-scmutils 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKrPhPM-JB1sOJ3aOSg9qPqYu6iUXFwnLZLD8HwdifE+5-0ztw@mail.gmail.com \
--to=beffa@ieee.org \
--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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.