From c7117a1e192836afed90f424f38ed00591d26c4f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 2 Apr 2023 15:17:10 +0200 Subject: [PATCH 1/3] =?UTF-8?q?ocamlPackages.bwd:=202.0.0=20=E2=86=92=204.?= =?UTF-8?q?0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/bwd/default.nix | 5 +++-- pkgs/development/ocaml-modules/cooltt/default.nix | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) 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; From 0d7be800f78e91a19c7218257885260bb558c097 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 2 Apr 2023 15:17:15 +0200 Subject: [PATCH 2/3] ocamlPackages.algaeff: init at 0.2.1 --- .../ocaml-modules/algaeff/default.nix | 26 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/ocaml-modules/algaeff/default.nix 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/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 { }; From da8413266703b3b3df1a9ba3014b4d9b907f3836 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 2 Apr 2023 15:17:18 +0200 Subject: [PATCH 3/3] =?UTF-8?q?ocamlPackages.yuujinchou:=202.0.0=20?= =?UTF-8?q?=E2=86=92=204.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/yuujinchou/default.nix | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) 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 ]; };