1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/by-name/oq/oqs-provider/package.nix
2024-07-15 09:32:07 +02:00

60 lines
1.2 KiB
Nix

{ stdenv
, fetchFromGitHub
, cmake
, openssl
, liboqs
, lib
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
name = "oqs-provider";
version = "0.6.1";
src = fetchFromGitHub {
owner = "open-quantum-safe";
repo = "oqs-provider";
rev = finalAttrs.version;
hash = "sha256-AW0rOszXm9Hy55b2fQ2mpZulhXjYwvztwL6DIFgIzjA=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
openssl
liboqs
];
nativeCheckInputs = [ openssl.bin ];
configureFlags = [ "--with-modulesdir=$$out/lib/ossl-modules" ];
postPatch = ''
echo ${finalAttrs.version} > VERSION
'';
preInstall = ''
mkdir -p "$out"
for dir in "$out" "${openssl.out}"; do
mkdir -p .install/"$(dirname -- "$dir")"
ln -s "$out" ".install/$dir"
done
export DESTDIR="$(realpath .install)"
'';
enableParallelInstalling = false;
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://github.com/open-quantum-safe/oqs-provider";
description = "Open Quantum Safe provider for OpenSSL (3.x)";
license = licenses.mit;
maintainers = with maintainers; [ rixxc ];
platforms = platforms.all;
};
})