nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchurl, buildDunePackage, ounit2, cstruct, dune-configurator, eqaf, pkg-config
2, withFreestanding ? false
3, ocaml-freestanding
4}:
5
6buildDunePackage rec {
7 minimalOCamlVersion = "4.08";
8 duneVersion = "3";
9
10 pname = "mirage-crypto";
11 version = "0.11.0";
12
13 src = fetchurl {
14 url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-${version}.tbz";
15 sha256 = "sha256-A5SCuVmcIJo3dL0Tu//fQqEV0v3FuCxuANWnBo7hUeQ=";
16 };
17
18 doCheck = true;
19 checkInputs = [ ounit2 ];
20
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ dune-configurator ];
23 propagatedBuildInputs = [
24 cstruct eqaf
25 ] ++ lib.optionals withFreestanding [
26 ocaml-freestanding
27 ];
28
29 meta = with lib; {
30 homepage = "https://github.com/mirage/mirage-crypto";
31 description = "Simple symmetric cryptography for the modern age";
32 license = [
33 licenses.isc # default license
34 licenses.bsd2 # mirage-crypto-rng-mirage
35 licenses.mit # mirage-crypto-ec
36 ];
37 maintainers = with maintainers; [ sternenseemann ];
38 };
39}