nixpkgs/pkgs/development/ocaml-modules/mlgmp/default.nix

40 lines
989 B
Nix
Raw Normal View History

2013-06-16 20:23:51 +00:00
{stdenv, fetchurl, ocaml, findlib, gmp, mpfr, ncurses }:
if stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "mlgmp is not available for OCaml ${ocaml.version}" else
2013-06-16 20:23:51 +00:00
let
pname = "mlgmp";
in
2016-10-05 07:32:30 +00:00
stdenv.mkDerivation rec {
2013-06-16 20:23:51 +00:00
name = "${pname}-${version}";
2016-10-05 07:32:30 +00:00
version = "20120224";
2013-06-16 20:23:51 +00:00
src = fetchurl {
url = "http://www-verimag.imag.fr/~monniaux/download/${pname}_${version}.tar.gz";
sha256 = "3ce1a53fa452ff5a9ba618864d3bc46ef32190b57202d1e996ca7df837ad4f24";
};
makeFlags = [
2016-10-05 07:32:30 +00:00
"DESTDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/gmp"
2013-06-16 20:23:51 +00:00
];
preConfigure = "make clean";
buildInputs = [ocaml findlib gmp mpfr ncurses];
createFindlibDestdir = true;
propagatedbuildInputs = [gmp mpfr ncurses];
postInstall = ''
2016-10-05 07:32:30 +00:00
cp ${./META} $out/lib/ocaml/${ocaml.version}/site-lib/gmp/META
2013-06-16 20:23:51 +00:00
'';
meta = {
homepage = http://opam.ocamlpro.com/pkg/mlgmp.20120224.html;
description = "OCaml bindings to GNU MP library";
license = "Free software ?";
};
}