From 6620de7594cf2b4dd89c1b15c49495a52140d785 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 10 Dec 2018 20:14:42 +0000 Subject: [PATCH] ocamlPackages.atdgen: init at 2.0.0 Atdgen is a command-line program that takes as input type definitions in the ATD syntax and produces OCaml code suitable for data serialization and deserialization. Homepage: https://github.com/mjambon/atd --- .../ocaml-modules/atdgen/default.nix | 26 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/ocaml-modules/atdgen/default.nix diff --git a/pkgs/development/ocaml-modules/atdgen/default.nix b/pkgs/development/ocaml-modules/atdgen/default.nix new file mode 100644 index 00000000000..d8ef2fec999 --- /dev/null +++ b/pkgs/development/ocaml-modules/atdgen/default.nix @@ -0,0 +1,26 @@ +{ buildDunePackage, atd, biniou, yojson }: + +let runtime = + buildDunePackage { + pname = "atdgen-runtime"; + inherit (atd) version src; + + propagatedBuildInputs = [ biniou yojson ]; + + meta = { inherit (atd.meta) license; }; + } +; in + +buildDunePackage { + pname = "atdgen"; + inherit (atd) version src; + + buildInputs = [ atd ]; + + propagatedBuildInputs = [ runtime ]; + + meta = { + description = "Generates efficient JSON serializers, deserializers and validators"; + inherit (atd.meta) license; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 0af48890ff1..9c3e81e3177 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -54,6 +54,8 @@ let atd = callPackage ../development/ocaml-modules/atd { }; + atdgen = callPackage ../development/ocaml-modules/atdgen { }; + base64 = callPackage ../development/ocaml-modules/base64 { }; bap = callPackage ../development/ocaml-modules/bap {