1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/development/ocaml-modules/mlgmp/default.nix

40 lines
989 B
Nix
Raw Normal View History

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