-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoqs-provider.nix
46 lines (39 loc) · 1023 Bytes
/
oqs-provider.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
lib,
stdenv,
fetchFromGitHub,
cmake,
openssl,
liboqs,
enableStatic ? stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "oqs-provider";
name = "oqsprovider";
version = "0.7.0";
src = fetchFromGitHub {
owner = "open-quantum-safe";
repo = pname;
rev = version;
sha256 = "sha256-KKZMb6ebaXxLSr5aV0m0VIHj2ofaRYQ0JF5JMAfiEj4=";
};
nativeBuildInputs = [ cmake openssl liboqs ];
buildInputs = [ ];
cmakeFlags = [
"-DOQS_PROVIDER_BUILD_STATIC=${if enableStatic then "ON" else "OFF"}"
"-DOQS_DIST_BUILD=ON"
"-DOQS_BUILD_ONLY_LIB=ON"
];
installPhase = ''
mkdir -p $out/lib/ossl-modules
cp lib/* $out/lib/ossl-modules
'';
dontFixCmake = true; # fix CMake file will give an error
meta = with lib; {
description = "C library for prototyping and experimenting with quantum-resistant cryptography";
homepage = "https://openquantumsafe.org";
license = licenses.mit;
platforms = platforms.all;
maintainers = [];
};
}