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 { buildDunePackage rec {
pname = "yuujinchou"; pname = "yuujinchou";
version = "2.0.0"; inherit (params) version;
minimalOCamlVersion = "4.12"; minimalOCamlVersion = "4.12";
duneVersion = "3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "RedPRL"; owner = "RedPRL";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256:1nhz44cyipy922anzml856532m73nn0g7iwkg79yzhq6yb87109w"; inherit (params) hash;
}; };
propagatedBuildInputs = params.propagatedBuildInputs or [];
doCheck = true; doCheck = true;
checkInputs = [ qcheck-alcotest ]; checkInputs = [ qcheck-alcotest ];
meta = { meta = {
description = "Name pattern combinators"; description = "Name pattern combinators";
inherit (src.meta) homepage; homepage = "https://github.com/RedPRL/yuujinchou";
license = lib.licenses.asl20; license = lib.licenses.asl20;
maintainers = [ lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
}; };