2017-07-04 23:39:37 +02:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, obuild }:
|
|
|
|
|
2019-09-20 19:14:39 +02:00
|
|
|
let param =
|
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.07"
|
|
|
|
then {
|
|
|
|
version = "2.0.4";
|
|
|
|
sha256 = "05a391m1l04zigi6ghywj7f5kxy2w6186221k7711wmg56m94yjw";
|
|
|
|
} else {
|
|
|
|
version = "2.0.3";
|
|
|
|
sha256 = "19xykhqk7q25r1pj8rpfj53j2r9ls8mxi1w5m2wqshrf20gf078h";
|
|
|
|
}
|
|
|
|
; in
|
2017-07-04 23:39:37 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-09-20 19:14:39 +02:00
|
|
|
name = "ocaml${ocaml.version}-ptmap-${param.version}";
|
2017-07-04 23:39:37 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
2019-09-20 19:14:39 +02:00
|
|
|
url = "https://github.com/backtracking/ptmap/archive/v${param.version}.tar.gz";
|
|
|
|
inherit (param) sha256;
|
2017-07-04 23:39:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib obuild ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
substituteInPlace ptmap.obuild --replace 'build-deps: qcheck' ""
|
|
|
|
obuild configure
|
|
|
|
obuild build lib-ptmap
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
obuild install --destdir $out/lib/ocaml/${ocaml.version}/site-lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.lri.fr/~filliatr/software.en.html";
|
2017-07-04 23:39:37 +02:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
description = "Maps over integers implemented as Patricia trees";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ volth ];
|
|
|
|
};
|
|
|
|
}
|