Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildDunePackage
3, fetchFromGitHub
4, ocaml
5
6, ounit
7, zarith
8}:
9
10buildDunePackage rec {
11 pname = "rfc7748";
12 version = "1.0";
13
14 src = fetchFromGitHub {
15 owner = "burgerdev";
16 repo = "ocaml-rfc7748";
17 rev = "v${version}";
18 sha256 = "sha256-mgZooyfxrKBVQFn01B8PULmFUW9Zq5HJfgHCSJSkJo4=";
19 };
20
21 minimalOCamlVersion = "4.05";
22
23 propagatedBuildInputs = [ zarith ];
24
25 doCheck = lib.versionAtLeast ocaml.version "4.08";
26 checkInputs = [ ounit ];
27
28 meta = {
29 homepage = "https://github.com/burgerdev/ocaml-rfc7748";
30 description = "Elliptic Curve Diffie-Hellman on Edwards Curves (X25519, X448)";
31 longDescription = ''
32 This library implements the ECDH functions 'X25519' and 'X448' as specified
33 in RFC 7748, 'Elliptic curves for security'. In the spirit of the original
34 publications, the public API is kept as simple as possible to make it easy
35 to use and hard to misuse.
36 '';
37 license = lib.licenses.bsd2;
38 maintainers = with lib.maintainers; [ fufexan ];
39 };
40}