From 77b1d5ef0e2b047b15a55737e91b75b7cdd63cba Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Thu, 15 Jul 2021 16:06:42 +0200 Subject: [PATCH] ocamlPackages.secp256k1-internal: init at 0.2.0 --- .../secp256k1-internal/default.nix | 48 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/ocaml-modules/secp256k1-internal/default.nix diff --git a/pkgs/development/ocaml-modules/secp256k1-internal/default.nix b/pkgs/development/ocaml-modules/secp256k1-internal/default.nix new file mode 100644 index 00000000000..f7d3c1e41c5 --- /dev/null +++ b/pkgs/development/ocaml-modules/secp256k1-internal/default.nix @@ -0,0 +1,48 @@ +{ lib +, fetchFromGitLab +, buildDunePackage +, gmp +, dune-configurator +, cstruct +, bigstring +, alcotest +, hex +}: + +buildDunePackage rec { + pname = "secp256k1-internal"; + version = "0.2"; + src = fetchFromGitLab { + owner = "nomadic-labs"; + repo = "ocaml-secp256k1-internal"; + rev = "v${version}"; + sha256 = "1g9fyi78nmmm19l2cggwj14m4n80rz7gmnh1gq376zids71s6qxv"; + }; + + useDune2 = true; + + minimalOCamlVersion = "4.08"; + + propagatedBuildInputs = [ + gmp + cstruct + bigstring + ]; + + buildInputs = [ + dune-configurator + ]; + + checkInputs = [ + alcotest + hex + ]; + + doCheck = true; + + meta = { + description = "Bindings to secp256k1 internal functions (generic operations on the curve)"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ulrikstrid ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e5a792caf0f..ebe7465fae5 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1031,6 +1031,8 @@ let inherit (pkgs) secp256k1; }; + secp256k1-internal = callPackage ../development/ocaml-modules/secp256k1-internal { }; + seq = callPackage ../development/ocaml-modules/seq { }; sosa = callPackage ../development/ocaml-modules/sosa { };