diff options
author | Ulrik Strid <ulrik.strid@outlook.com> | 2021-07-12 11:29:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 11:29:43 +0200 |
commit | a164e1d0a17549cc4c238cfe9c32a0bac97b24e1 (patch) | |
tree | 9833a630b8bc870aef817f36031be6634740f256 /pkgs/development/ocaml-modules | |
parent | 17de7c8df1436a2e71d9efdf6f10ea0585fe5c8e (diff) | |
download | nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar.gz nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar.bz2 nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar.lz nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar.xz nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.tar.zst nixlib-a164e1d0a17549cc4c238cfe9c32a0bac97b24e1.zip |
ocamlPackages.json-data-encoding: init at 0.8, ocamlPackages.data-encoding: init at 0.2.0 (#129444)
Diffstat (limited to 'pkgs/development/ocaml-modules')
3 files changed, 97 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/data-encoding/default.nix b/pkgs/development/ocaml-modules/data-encoding/default.nix new file mode 100644 index 000000000000..2e4e0518a522 --- /dev/null +++ b/pkgs/development/ocaml-modules/data-encoding/default.nix @@ -0,0 +1,46 @@ +{ lib +, fetchFromGitLab +, buildDunePackage +, ezjsonm +, zarith +, hex +, json-data-encoding +, json-data-encoding-bson +, alcotest +, crowbar +}: + +buildDunePackage { + pname = "data-encoding"; + version = "0.2.0"; + + src = fetchFromGitLab { + owner = "nomadic-labs"; + repo = "data-encoding"; + rev = "0.2"; + sha256 = "0d9c2ix2imqk4r0jfhnwak9laarlbsq9kmswvbnjzdm2g0hwin1d"; + }; + useDune2 = true; + + propagatedBuildInputs = [ + ezjsonm + zarith + hex + json-data-encoding + json-data-encoding-bson + ]; + + checkInputs = [ + alcotest + crowbar + ]; + + doCheck = true; + + meta = { + homepage = "https://gitlab.com/nomadic-labs/data-encoding"; + description = "Library of JSON and binary encoding combinators"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/development/ocaml-modules/json-data-encoding/bson.nix b/pkgs/development/ocaml-modules/json-data-encoding/bson.nix new file mode 100644 index 000000000000..5048a8fd06a7 --- /dev/null +++ b/pkgs/development/ocaml-modules/json-data-encoding/bson.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, json-data-encoding, ocplib-endian, crowbar }: + +buildDunePackage { + pname = "json-data-encoding-bson"; + + inherit (json-data-encoding) version src useDune2 doCheck; + + propagatedBuildInputs = [ + json-data-encoding + ocplib-endian + ]; + + checkInputs = [ + crowbar + ]; + + meta = json-data-encoding.meta // { + description = "Type-safe encoding to and decoding from JSON (bson support)"; + }; +} diff --git a/pkgs/development/ocaml-modules/json-data-encoding/default.nix b/pkgs/development/ocaml-modules/json-data-encoding/default.nix new file mode 100644 index 000000000000..6dfea612b10a --- /dev/null +++ b/pkgs/development/ocaml-modules/json-data-encoding/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchFromGitLab, buildDunePackage, uri, crowbar }: + +buildDunePackage rec { + pname = "json-data-encoding"; + version = "0.8"; + + src = fetchFromGitLab { + owner = "nomadic-labs"; + repo = "json-data-encoding"; + rev = "v${version}"; + sha256 = "1c6m2qvi9bm6qjxc38p6cia1f66r0rb9xf6b8svlj3jjymvqw889"; + }; + useDune2 = true; + + propagatedBuildInputs = [ + uri + ]; + + checkInputs = [ + crowbar + ]; + + doCheck = true; + + meta = { + homepage = "https://gitlab.com/nomadic-labs/json-data-encoding"; + description = "Type-safe encoding to and decoding from JSON"; + license = lib.licenses.lgpl3; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} |