summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/wodan
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2020-12-26 18:52:48 +0100
committerVincent Laporte <Vincent.Laporte@gmail.com>2021-01-22 08:34:26 +0100
commit93e31f2a78db66ecf3aa497c7fbed758655eea2e (patch)
tree1af342c03d1e748ff513dba803fc9410690f61f3 /pkgs/development/ocaml-modules/wodan
parentab361e2b8e44e49e431e2ce5a31d1593eef07693 (diff)
downloadnixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar.gz
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar.bz2
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar.lz
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar.xz
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.tar.zst
nixpkgs-93e31f2a78db66ecf3aa497c7fbed758655eea2e.zip
ocamlPackages.wodan: init unstable-2020-11-20
Diffstat (limited to 'pkgs/development/ocaml-modules/wodan')
-rw-r--r--pkgs/development/ocaml-modules/wodan/default.nix40
-rw-r--r--pkgs/development/ocaml-modules/wodan/irmin.nix20
-rw-r--r--pkgs/development/ocaml-modules/wodan/unix.nix27
3 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/wodan/default.nix b/pkgs/development/ocaml-modules/wodan/default.nix
new file mode 100644
index 00000000000..64ca29f2030
--- /dev/null
+++ b/pkgs/development/ocaml-modules/wodan/default.nix
@@ -0,0 +1,40 @@
+{ lib, buildDunePackage, fetchFromGitHub, lwt_ppx, ppx_cstruct, optint
+, checkseum, diet, bitv, nocrypto, logs, lru, io-page, mirage-block }:
+
+buildDunePackage rec {
+  pname = "wodan";
+  version = "unstable-2020-11-20";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "mirage";
+    repo = pname;
+    rev = "cc08fe25888051c207f1009bcd2d39f8c514484f";
+    sha256 = "0186vlhnl8wcz2hmpn327n9a0bibnypmjy3w4nxq3yyglh6vj1im";
+    fetchSubmodules = true;
+  };
+
+  minimumOCamlVersion = "4.08";
+
+  propagatedBuildInputs = [
+    lwt_ppx
+    ppx_cstruct
+    optint
+    checkseum
+    diet
+    bitv
+    nocrypto
+    logs
+    lru
+    io-page
+    mirage-block
+  ];
+
+  meta = with lib; {
+    inherit (src.meta) homepage;
+    description = "A flash-friendly, safe and flexible filesystem library";
+    license = licenses.isc;
+    maintainers = with maintainers; [ ehmry ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/wodan/irmin.nix b/pkgs/development/ocaml-modules/wodan/irmin.nix
new file mode 100644
index 00000000000..a42259af9e6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/wodan/irmin.nix
@@ -0,0 +1,20 @@
+{ lib, buildDunePackage, io-page-unix, irmin-chunk, irmin-git, irmin-unix
+, mirage-block-ramdisk, mirage-block-unix, wodan }:
+
+buildDunePackage rec {
+  pname = "wodan-irmin";
+  inherit (wodan) version src useDune2;
+
+  propagatedBuildInputs = [
+    io-page-unix
+    irmin-chunk
+    irmin-git
+    irmin-unix
+    mirage-block-ramdisk
+    mirage-block-unix
+    wodan
+  ];
+
+  meta = wodan.meta // { description = "Wodan as an Irmin store"; };
+
+}
diff --git a/pkgs/development/ocaml-modules/wodan/unix.nix b/pkgs/development/ocaml-modules/wodan/unix.nix
new file mode 100644
index 00000000000..64a18b6b83d
--- /dev/null
+++ b/pkgs/development/ocaml-modules/wodan/unix.nix
@@ -0,0 +1,27 @@
+{ lib, buildDunePackage, base64, benchmark, csv, cmdliner, wodan, afl-persistent
+, io-page-unix, mirage-block-ramdisk, mirage-block-unix }:
+
+buildDunePackage rec {
+  outputs = [ "bin" "out" ];
+  pname = "wodan-unix";
+  inherit (wodan) version src useDune2;
+
+  propagatedBuildInputs = [
+    afl-persistent
+    base64
+    benchmark
+    cmdliner
+    csv
+    io-page-unix
+    mirage-block-ramdisk
+    mirage-block-unix
+    wodan
+  ];
+
+  postInstall = ''
+    moveToOutput bin "''${!outputBin}"
+  '';
+
+  meta = wodan.meta // { description = "Wodan clients with Unix integration"; };
+
+}