ocamlPackages.{repr,ppx_repr}: init at 0.2.1

This commit is contained in:
sternenseemann 2021-01-12 19:49:44 +01:00 committed by Vincent Laporte
parent 7fee56ec59
commit a7a61998e9
3 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,30 @@
{ lib, buildDunePackage, fetchurl, fmt, uutf, jsonm, base64, either }:
buildDunePackage rec {
pname = "repr";
version = "0.2.1";
minimumOCamlVersion = "4.08";
src = fetchurl {
url = "https://github.com/mirage/${pname}/releases/download/${version}/${pname}-fuzz-${version}.tbz";
sha256 = "1cbzbawbn71mmpw8y84s1p2pbhc055w1znz64jvr00c7fdr9p8hc";
};
useDune2 = true;
propagatedBuildInputs = [
fmt
uutf
jsonm
base64
either
];
meta = with lib; {
description = "Dynamic type representations. Provides no stability guarantee";
homepage = "https://github.com/mirage/repr";
license = licenses.isc;
maintainers = [ maintainers.sternenseemann ];
};
}

View File

@ -0,0 +1,23 @@
{ buildDunePackage, repr, ppxlib, ppx_deriving, alcotest, hex }:
buildDunePackage {
pname = "ppx_repr";
inherit (repr) src version useDune2;
propagatedBuildInputs = [
repr
ppxlib
ppx_deriving
];
doCheck = true;
checkInputs = [
alcotest
hex
];
meta = repr.meta // {
description = "PPX deriver for type representations";
};
}

View File

@ -885,6 +885,8 @@ let
resource-pooling = callPackage ../development/ocaml-modules/resource-pooling { }; resource-pooling = callPackage ../development/ocaml-modules/resource-pooling { };
repr = callPackage ../development/ocaml-modules/repr { };
result = callPackage ../development/ocaml-modules/ocaml-result { }; result = callPackage ../development/ocaml-modules/ocaml-result { };
secp256k1 = callPackage ../development/ocaml-modules/secp256k1 { secp256k1 = callPackage ../development/ocaml-modules/secp256k1 {
@ -969,6 +971,8 @@ let
ppx_irmin = callPackage ../development/ocaml-modules/irmin/ppx.nix { ppx_irmin = callPackage ../development/ocaml-modules/irmin/ppx.nix {
}; };
ppx_repr = callPackage ../development/ocaml-modules/repr/ppx.nix { };
ppx_tools = ppx_tools =
if lib.versionAtLeast ocaml.version "4.02" if lib.versionAtLeast ocaml.version "4.02"
then callPackage ../development/ocaml-modules/ppx_tools {} then callPackage ../development/ocaml-modules/ppx_tools {}