git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.mirage-crypto*: 0.8.10 -> 0.9.0

ocamlPackages.mirage-crypto: allow compiling with ocaml-freestanding ocamlPackages.mirage-crypto-ec: init at 0.9.0 https://github.com/mirage/mirage-crypto/releases/tag/v0.9.0

commit77ffcfa47ac8228801fb0175fe585b4b1763a654 authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> dateTue 30 Mar 2021, 14:56 (6 years ago) parentb8a5a43
3 files changed+73−5
pkgs/development/ocaml-modules/mirage-crypto/default.nix+16−5 pkgs/development/ocaml-modules/mirage-crypto/ec.nix+55 pkgs/top-level/ocaml-packages.nix+2
pkgs/development/ocaml-modules/mirage-crypto/default.nix+16−5
@@ -1,14 +1,17 @@
1−{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, pkg-config }:
1+{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, eqaf, pkg-config
2+, withFreestanding ? false
3+, ocaml-freestanding
4+}:
25
36buildDunePackage rec {
47 minimumOCamlVersion = "4.08";
58
69 pname = "mirage-crypto";
7− version = "0.8.10";
10+ version = "0.9.0";
811
912 src = fetchurl {
1013 url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz";
11− sha256 = "8a5976fe7837491d2fbd1917b77524776f70ae590e9f55cf757cc8951b5481fc";
14+ sha256 = "716684f8a70031f16115e3c84d42141c75fb1e688b7a699bbd09166176ed5217";
1215 };
1316
1417 useDune2 = true;
@@ -17,12 +20,20 @@ buildDunePackage rec {
1720 checkInputs = [ ounit ];
1821
1922 nativeBuildInputs = [ dune-configurator pkg-config ];
20− propagatedBuildInputs = [ cstruct eqaf ];
23+ propagatedBuildInputs = [
24+ cstruct eqaf
25+ ] ++ lib.optionals withFreestanding [
26+ ocaml-freestanding
27+ ];
2128
2229 meta = with lib; {
2330 homepage = "https://github.com/mirage/mirage-crypto";
2431 description = "Simple symmetric cryptography for the modern age";
25− license = licenses.isc;
32+ license = [
33+ licenses.isc # default license
34+ licenses.bsd2 # mirage-crypto-rng-mirage
35+ licenses.mit # mirage-crypto-ec
36+ ];
2637 maintainers = with maintainers; [ sternenseemann ];
2738 };
2839}
pkgs/development/ocaml-modules/mirage-crypto/ec.nixnew file+55
@@ -0,0 +1,55 @@
1+{ lib
2+, buildDunePackage
3+, mirage-crypto
4+, dune-configurator
5+, pkg-config
6+, cstruct
7+, mirage-crypto-rng
8+, mirage-crypto-pk
9+, hex
10+, alcotest
11+, asn1-combinators
12+, ppx_deriving_yojson
13+, ppx_deriving
14+, yojson
15+, withFreestanding ? false
16+, ocaml-freestanding
17+}:
18+
19+buildDunePackage {
20+ pname = "mirage-crypto-ec";
21+
22+ inherit (mirage-crypto)
23+ minimumOCamlVersion
24+ src
25+ version
26+ useDune2
27+ ;
28+
29+ nativeBuildInputs = [
30+ pkg-config
31+ dune-configurator
32+ ];
33+ propagatedBuildInputs = [
34+ cstruct
35+ mirage-crypto
36+ mirage-crypto-rng
37+ ] ++ lib.optionals withFreestanding [
38+ ocaml-freestanding
39+ ];
40+
41+ doCheck = true;
42+ checkInputs = [
43+ hex
44+ alcotest
45+ asn1-combinators
46+ ppx_deriving_yojson
47+ ppx_deriving
48+ yojson
49+ mirage-crypto-pk
50+ ];
51+
52+ meta = mirage-crypto.meta // {
53+ description = "Elliptic Curve Cryptography with primitives taken from Fiat";
54+ };
55+}
pkgs/top-level/ocaml-packages.nix+2
@@ -691,6 +691,8 @@ let
691691
692692 mirage-crypto = callPackage ../development/ocaml-modules/mirage-crypto { };
693693
694+ mirage-crypto-ec = callPackage ../development/ocaml-modules/mirage-crypto/ec.nix { };
695+
694696 mirage-crypto-pk = callPackage ../development/ocaml-modules/mirage-crypto/pk.nix { };
695697
696698 mirage-crypto-rng = callPackage ../development/ocaml-modules/mirage-crypto/rng.nix { };