From ed9f9a7765ac5cf65e686986262802cdb918f4d7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 15 Jan 2013 22:49:50 +0100 Subject: distro: Add GNU bc. * distro/packages/algebra.scm (bc): New variable. --- distro/packages/algebra.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/distro/packages/algebra.scm b/distro/packages/algebra.scm index dd89ec4302..7bbdd6c092 100644 --- a/distro/packages/algebra.scm +++ b/distro/packages/algebra.scm @@ -22,6 +22,7 @@ #:use-module (distro packages multiprecision) #:use-module (distro packages perl) #:use-module (distro packages readline) + #:use-module (distro packages flex) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -150,3 +151,43 @@ transcendental functions. PARI is also available as a C library to allow for faster computations.") (license gpl2+) (home-page "http://pari.math.u-bordeaux.fr/"))) + +(define-public bc + (package + (name "bc") + (version "1.06") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz")) + (sha256 + (base32 + "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf")))) + (build-system gnu-build-system) + (inputs `(("readline" ,readline) + ("flex" ,flex))) + (arguments + '(#:phases + (alist-replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; This old `configure' script doesn't support + ;; variables passed as arguments. + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (zero? + (system* "./configure" + (string-append "--prefix=" out))))) + %standard-phases))) + (home-page "http://www.gnu.org/software/bc/") + (synopsis "GNU software calculator") + (description + "bc is an arbitrary precision numeric processing language. Syntax +is similar to C, but differs in many substantial areas. It supports +interactive execution of statements. bc is a utility included in the +POSIX P1003.2/D11 draft standard. + +Since the POSIX document does not specify how bc must be implemented, +this version does not use the historical method of having bc be a +compiler for the dc calculator. This version has a single executable +that both compiles the language and runs the resulting `byte code'. The +byte code is not the dc language.") + (license gpl2+))) -- cgit v1.2.3