diff options
author | John Darrington <jmd@gnu.org> | 2017-02-26 20:28:48 +0100 |
---|---|---|
committer | John Darrington <jmd@gnu.org> | 2017-03-02 18:17:26 +0100 |
commit | 479c4273e6ae899f16da2ebcb36e11baca1af9c8 (patch) | |
tree | 21fb83a338caf2eb96891525779ce75e93a95729 /gnu/packages/maths.scm | |
parent | 8c48d0eb339f38522570a4032a75f77e9c91cca8 (diff) | |
download | patches-479c4273e6ae899f16da2ebcb36e11baca1af9c8.tar patches-479c4273e6ae899f16da2ebcb36e11baca1af9c8.tar.gz |
gnu: Add jacal.
* gnu/packages/maths.scm (jacal): New variable.
* gnu/packages/patches/jacal-fix-texinfo.patch: New file.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r-- | gnu/packages/maths.scm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 913a403dab..9533f5f0a8 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -83,6 +83,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages tbb) + #:use-module (gnu packages scheme) #:use-module (gnu packages shells) #:use-module (gnu packages tcl) #:use-module (gnu packages texinfo) @@ -2958,3 +2959,54 @@ algorithm for LCS. It is a fast program to compute the approximate Longest Commons Subsequence of a set of strings.") (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") (license license:gpl3+)))) + +(define-public jacal + (package + (name "jacal") + (version "1c4") + (source (origin + (method url-fetch) + (uri (string-append + "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-" + version ".zip")) + (sha256 (base32 + "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q")) + (patches (search-patches "jacal-fix-texinfo.patch")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'pre-build + ;; Don't use upstream's script - it really doesn't fit into + ;; Guix's functional paradigm. + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile" + (("^install: install-script") "install: ")))) + (add-after 'install 'post-install + ;; Instead, we provide our own simplified script. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((wrapper (string-append (assoc-ref outputs "out") + "/bin/jacal"))) + (format (open wrapper (logior O_WRONLY O_CREAT)) + (string-append "#!~a\nexec ~a/bin/scm -ip1 " + "-e '(slib:load \"~a/lib/jacal/math\") " + "(math)' \"$@\"\n") + (which "bash") + (assoc-ref inputs "scm") + (assoc-ref outputs "out")) + (chmod wrapper #o555)))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (zero? (system* "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out"))))))))) + (inputs `(("scm" ,scm))) + (native-inputs `(("unzip" ,unzip) + ("texinfo" ,texinfo))) + (synopsis "Symbolic mathematics system") + (description "GNU JACAL is an interactive symbolic mathematics program based on +Scheme. It manipulate and simplify a range of mathematical expressions such +as equations, scalars, vectors, and matrices.") + (home-page "http://www.gnu.org/software/jacal") + (license license:gpl3+))) + |