at 18.09-beta 30 lines 923 B view raw
1{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg 2, bos, cmdliner, ocamlgraph 3}: 4 5if !stdenv.lib.versionAtLeast ocaml.version "4.03" 6then throw "functoria is not available for OCaml ${ocaml.version}" else 7 8stdenv.mkDerivation rec { 9 name = "ocaml${ocaml.version}-functoria-${version}"; 10 version = "2.0.2"; 11 src = fetchurl { 12 url = "http://github.com/mirage/functoria/releases/download/${version}/functoria-${version}.tbz"; 13 sha256 = "019rl4rir4lwgjyqj2wq3ylw4daih1kxxgbc6ld6kzcq66mwr747"; 14 }; 15 16 unpackCmd = "tar xjf $src"; 17 18 buildInputs = [ ocaml findlib ocamlbuild topkg ]; 19 propagatedBuildInputs = [ bos cmdliner ocamlgraph ]; 20 21 inherit (topkg) buildPhase installPhase; 22 23 meta = { 24 description = "A DSL to organize functor applications"; 25 homepage = https://github.com/mirage/functoria; 26 license = stdenv.lib.licenses.isc; 27 maintainers = [ stdenv.lib.maintainers.vbgl ]; 28 inherit (ocaml.meta) platforms; 29 }; 30}