a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
38 lines
893 B
Nix
38 lines
893 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, openssl
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "liboqs";
|
|
version = "0.7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "open-quantum-safe";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-cwrTHj/WFDZ9Ez2FhjpRhEx9aC5xBnh7HR/9T+zUpZc=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ openssl ];
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_SHARED_LIBS=${if enableStatic then "OFF" else "ON"}"
|
|
"-DOQS_DIST_BUILD=ON"
|
|
"-DOQS_BUILD_ONLY_LIB=ON"
|
|
];
|
|
|
|
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 = with maintainers; [ candyc1oud ];
|
|
};
|
|
}
|