summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-12-23 08:57:05 -0500
committerGitHub <noreply@github.com>2019-12-23 08:57:05 -0500
commit612752a4ae7637a12b0abfd05c52e5be3adee44b (patch)
tree6f2e34f3b81de6f1235b490c94db26b6ac312ca3 /pkgs/development/ocaml-modules
parente5b15985649240ae94f4fe82344cfcd522920ea5 (diff)
parent80da0a626e6dcf87c68a45fe0305c59587271c0c (diff)
downloadnixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar.gz
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar.bz2
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar.lz
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar.xz
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.tar.zst
nixpkgs-612752a4ae7637a12b0abfd05c52e5be3adee44b.zip
Merge pull request #76198 from bcdarwin/update-functoria
functoria: 2.0.2 -> 3.0.3
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/functoria/default.nix41
1 files changed, 20 insertions, 21 deletions
diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix
index a174bd6a8b1..cc99b726e6e 100644
--- a/pkgs/development/ocaml-modules/functoria/default.nix
+++ b/pkgs/development/ocaml-modules/functoria/default.nix
@@ -1,28 +1,27 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
-, bos, cmdliner, ocamlgraph
+{ stdenv, fetchurl, buildDunePackage, alcotest, cmdliner
+, rresult, astring, fmt, ocamlgraph, logs, bos, fpath, ptime
 }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.03"
-then throw "functoria is not available for OCaml ${ocaml.version}" else
+buildDunePackage rec {
+  pname   = "functoria";
+  version = "3.0.3";
 
-stdenv.mkDerivation rec {
-	name = "ocaml${ocaml.version}-functoria-${version}";
-	version = "2.0.2";
-	src = fetchurl {
-		url = "https://github.com/mirage/functoria/releases/download/${version}/functoria-${version}.tbz";
-		sha256 = "019rl4rir4lwgjyqj2wq3ylw4daih1kxxgbc6ld6kzcq66mwr747";
-	};
+  minimumOCamlVersion = "4.04";
 
-	buildInputs = [ ocaml findlib ocamlbuild topkg ];
-	propagatedBuildInputs = [ bos cmdliner ocamlgraph ];
+  src = fetchurl {
+    url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
+    sha256 = "08wv2890gz7ci1fa2b3z4cvqf98nqb09f89y08kcmnsirlbbzlfh";
+  };
 
-	inherit (topkg) buildPhase installPhase;
+  propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ];
+  checkInputs = [ alcotest ];
 
-	meta = {
-		description = "A DSL to organize functor applications";
-		homepage = https://github.com/mirage/functoria;
-		license = stdenv.lib.licenses.isc;
-		maintainers = [ stdenv.lib.maintainers.vbgl ];
-		inherit (ocaml.meta) platforms;
-	};
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "A DSL to organize functor applications";
+    homepage    = https://github.com/mirage/functoria;
+    license     = licenses.isc;
+    maintainers = [ maintainers.vbgl ];
+  };
 }