ocamlPackages.yuujinchou: 2.0.0 → 4.0.0

This commit is contained in:
Vincent Laporte 2023-04-02 15:17:18 +02:00
parent 0d7be800f7
commit da84132667
No known key found for this signature in database
GPG key ID: EBD582ADDDB1F81F

View file

@ -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 ];
};