diff --git a/pkgs/development/ocaml-modules/algaeff/default.nix b/pkgs/development/ocaml-modules/algaeff/default.nix new file mode 100644 index 000000000000..7877d255a0af --- /dev/null +++ b/pkgs/development/ocaml-modules/algaeff/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildDunePackage +, fetchFromGitHub +}: + +buildDunePackage rec { + pname = "algaeff"; + version = "0.2.1"; + + minimalOCamlVersion = "5.0"; + duneVersion = "3"; + + src = fetchFromGitHub { + owner = "RedPRL"; + repo = pname; + rev = version; + hash = "sha256-jpnJhF+LN2ef6QPLcCHxcMg3Fr3GSLOnJkZ9ZUIOrlY="; + }; + + meta = { + description = "Reusable Effects-Based Components"; + homepage = "https://github.com/RedPRL/algaeff"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/bwd/default.nix b/pkgs/development/ocaml-modules/bwd/default.nix index aa762502a598..bff1de9bc865 100644 --- a/pkgs/development/ocaml-modules/bwd/default.nix +++ b/pkgs/development/ocaml-modules/bwd/default.nix @@ -2,15 +2,16 @@ buildDunePackage rec { pname = "bwd"; - version = "2.0.0"; + version = "2.1.0"; minimalOCamlVersion = "4.12"; + duneVersion = "3"; src = fetchFromGitHub { owner = "RedPRL"; repo = "ocaml-bwd"; rev = version; - sha256 = "sha256:0zgi8an53z6wr6nzz0zlmhx19zhqy1w2vfy1sq3sikjwh74jjq60"; + hash = "sha256-ucXOBjD1behL2h8CZv64xtRjCPkajZic7G1oxxDmEXY="; }; doCheck = true; diff --git a/pkgs/development/ocaml-modules/cooltt/default.nix b/pkgs/development/ocaml-modules/cooltt/default.nix index 837a06a2fdee..b19e01ceb345 100644 --- a/pkgs/development/ocaml-modules/cooltt/default.nix +++ b/pkgs/development/ocaml-modules/cooltt/default.nix @@ -49,6 +49,8 @@ let sha256 = "sha256:1xb754fha4s0bgjfqjxzqljvalmkfdwdn5y4ycsp51wiah235bsy"; }; + duneVersion = "3"; + propagatedBuildInputs = [ bwd ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/yuujinchou/default.nix b/pkgs/development/ocaml-modules/yuujinchou/default.nix index 5a78809d9099..5f0c0965b27b 100644 --- a/pkgs/development/ocaml-modules/yuujinchou/default.nix +++ b/pkgs/development/ocaml-modules/yuujinchou/default.nix @@ -1,24 +1,41 @@ -{ lib, fetchFromGitHub, buildDunePackage, qcheck-alcotest }: +{ lib, ocaml, fetchFromGitHub, buildDunePackage +, algaeff, bwd +, qcheck-alcotest +}: + +let params = if lib.versionAtLeast ocaml.version "5.0" then { + version = "4.0.0"; + hash = "sha256-yNLN5bBe4aft9Rl5VHmlOYTlnCdR2NgDWsc3uJHaZy4="; + propagatedBuildInputs = [ algaeff bwd ]; + } else { + version = "2.0.0"; + hash = "sha256:1nhz44cyipy922anzml856532m73nn0g7iwkg79yzhq6yb87109w"; + } +; in buildDunePackage rec { pname = "yuujinchou"; - version = "2.0.0"; + inherit (params) version; minimalOCamlVersion = "4.12"; + duneVersion = "3"; src = fetchFromGitHub { owner = "RedPRL"; repo = pname; rev = version; - sha256 = "sha256:1nhz44cyipy922anzml856532m73nn0g7iwkg79yzhq6yb87109w"; + inherit (params) hash; }; + propagatedBuildInputs = params.propagatedBuildInputs or []; + + doCheck = true; checkInputs = [ qcheck-alcotest ]; meta = { description = "Name pattern combinators"; - inherit (src.meta) homepage; + homepage = "https://github.com/RedPRL/yuujinchou"; license = lib.licenses.asl20; maintainers = [ lib.maintainers.vbgl ]; }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 3f8667af9ae7..bbe5c59e1f48 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -18,6 +18,8 @@ let alcotest-mirage = callPackage ../development/ocaml-modules/alcotest/mirage.nix {}; + algaeff = callPackage ../development/ocaml-modules/algaeff { }; + alsa = callPackage ../development/ocaml-modules/alsa { }; angstrom = callPackage ../development/ocaml-modules/angstrom { };