Browse Source

distro: Add GMP.

* distro/base.scm (gmp): New variable.
  (guile-1.8, guile-2.0): Use it.
Ludovic Courtès 10 years ago
  1. 46


@ -156,6 +156,48 @@ macro processor in its own right.")
(license "GPLv3+")
(home-page "")))
(define-public gmp
(name "gmp")
(version "5.0.5")
(source (origin
(method http-fetch)
(uri (string-append "" version
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
(arguments `(#:configure-flags
'(;; Build a "fat binary", with routines for several
;; sub-architectures.
(description "GMP, the GNU multiple precision arithmetic library")
"GMP is a free library for arbitrary precision arithmetic, operating on
signed integers, rational numbers, and floating point numbers. There is no
practical limit to the precision except the ones implied by the available
memory in the machine GMP runs on. GMP has a rich set of functions, and the
functions have a regular interface.
The main target applications for GMP are cryptography applications and
research, Internet security applications, algebra systems, computational
algebra research, etc.
GMP is carefully designed to be as fast as possible, both for small operands
and for huge operands. The speed is achieved by using fullwords as the basic
arithmetic type, by using fast algorithms, with highly optimised assembly
code for the most common inner loops for a lot of CPUs, and by a general
emphasis on speed.
GMP is faster than any other bignum library. The advantage for GMP increases
with the operand sizes for many operations, since GMP uses asymptotically
faster algorithms.")
(license "LGPLv3+")
(home-page "")))
(define-public guile-1.8
(name "guile")
@ -193,7 +235,7 @@ macro processor in its own right.")
;; Since `guile-1.8.pc' has "Libs: ... -lgmp -lltdl", these must be
;; propagated.
(propagated-inputs `(("gmp" ,(nixpkgs-derivation "gmp"))
(propagated-inputs `(("gmp" ,gmp)
("libtool" ,(nixpkgs-derivation "libtool"))))
;; When cross-compiling, a native version of Guile itself is needed.
@ -235,7 +277,7 @@ extensible. It supports many SRFIs.")
;; The headers and/or `guile-2.0.pc' refer to these packages, so they
;; must be propagated.
("bdw-gc" ,(nixpkgs-derivation "boehmgc"))
("gmp" ,(nixpkgs-derivation "gmp"))))
("gmp" ,gmp)))
(self-native-input? #t)