ocamlPackages.{atd,atdgen}: 2.2.1 → 2.4.1

This commit is contained in:
Vincent Laporte 2022-04-23 10:50:39 +02:00 committed by Vincent Laporte
parent 5a90feb76a
commit 100e796af2
2 changed files with 14 additions and 31 deletions

View File

@ -1,25 +1,17 @@
{ lib, menhir, easy-format, fetchurl, buildDunePackage, which, re, nixosTests }:
{ lib, atdgen-codec-runtime, menhir, easy-format, buildDunePackage, which, re, nixosTests }:
buildDunePackage rec {
pname = "atd";
version = "2.2.1";
inherit (atdgen-codec-runtime) version src;
useDune2 = true;
minimumOCamlVersion = "4.02";
src = fetchurl {
url = "https://github.com/ahrefs/atd/releases/download/2.2.1/atd-2.2.1.tbz";
sha256 = "17jm79np69ixp53a4njxnlb1pg8sd1g47nm3nyki9clkc8d4qsyv";
};
minimalOCamlVersion = "4.08";
nativeBuildInputs = [ which menhir ];
propagatedBuildInputs = [ easy-format re ];
buildInputs = [ re ];
propagatedBuildInputs = [ easy-format ];
strictDeps = true;
doCheck = true;
passthru.tests = {
smoke-test = nixosTests.atd;
};
@ -27,7 +19,7 @@ buildDunePackage rec {
meta = with lib; {
homepage = "https://github.com/mjambon/atd";
description = "Syntax for cross-language type definitions";
license = licenses.bsd3;
license = licenses.mit;
maintainers = with maintainers; [ aij jwilberding ];
};
}

View File

@ -1,26 +1,17 @@
{ buildDunePackage, atd, biniou, yojson }:
let runtime =
buildDunePackage {
pname = "atdgen-runtime";
inherit (atd) version useDune2 src;
propagatedBuildInputs = [ biniou yojson ];
meta = { inherit (atd.meta) license; };
}
; in
{ buildDunePackage, alcotest, atd, atdgen-codec-runtime, atdgen-runtime, biniou, re, yojson }:
buildDunePackage {
pname = "atdgen";
inherit (atd) version useDune2 src;
inherit (atdgen-codec-runtime) version src;
buildInputs = [ atd ];
buildInputs = [ atd re ];
propagatedBuildInputs = [ runtime ];
propagatedBuildInputs = [ atdgen-runtime ];
meta = {
doCheck = true;
checkInputs = [ alcotest atdgen-codec-runtime ];
meta = atd.meta // {
description = "Generates efficient JSON serializers, deserializers and validators";
inherit (atd.meta) license;
};
}