diff options
author | Mihai Fufezan <fufexan@pm.me> | 2021-08-27 10:33:58 +0300 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-08-27 12:00:16 +0200 |
commit | 61ea3fe636a7ceaf0356e2b78a41f6587a46bf4d (patch) | |
tree | cff476b30c71758a385b06983df70ec8c34c53b8 | |
parent | 843eebbd8e0a951e5c2c3f1cd2e17a39f6c08701 (diff) |
ocamlPackages.rfc7748: init at 1.0
-rw-r--r-- | pkgs/development/ocaml-modules/rfc7748/default.nix | 43 | ||||
-rw-r--r-- | pkgs/top-level/ocaml-packages.nix | 2 |
2 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/rfc7748/default.nix b/pkgs/development/ocaml-modules/rfc7748/default.nix new file mode 100644 index 0000000000000..40356ec9aa5fc --- /dev/null +++ b/pkgs/development/ocaml-modules/rfc7748/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildDunePackage +, fetchFromGitHub +, ocaml + +, ounit +, zarith +}: + +buildDunePackage rec { + pname = "rfc7748"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "burgerdev"; + repo = "ocaml-rfc7748"; + rev = "v${version}"; + sha256 = "sha256-mgZooyfxrKBVQFn01B8PULmFUW9Zq5HJfgHCSJSkJo4="; + }; + + useDune2 = true; + + minimumOCamlVersion = "4.05"; + + propagatedBuildInputs = [ zarith ]; + + # the tests fail for 4.05 + doCheck = lib.versionAtLeast ocaml.version "4.06"; + checkInputs = [ ounit ]; + + meta = { + homepage = "https://github.com/burgerdev/ocaml-rfc7748"; + description = "Elliptic Curve Diffie-Hellman on Edwards Curves (X25519, X448)"; + longDescription = '' + This library implements the ECDH functions 'X25519' and 'X448' as specified + in RFC 7748, 'Elliptic curves for security'. In the spirit of the original + publications, the public API is kept as simple as possible to make it easy + to use and hard to misuse. + ''; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ fufexan ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b0d1337942d58..ea0c017cd54b4 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1180,6 +1180,8 @@ let reason-native = lib.recurseIntoAttrs (callPackage ../development/ocaml-modules/reason-native { }); + rfc7748 = callPackage ../development/ocaml-modules/rfc7748 { }; + ezresto = callPackage ../development/ocaml-modules/resto/ezresto.nix { }; ezresto-directory = callPackage ../development/ocaml-modules/resto/ezresto-directory.nix { }; |