Skip to content

Commit

Permalink
oqs-provider: init at 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxc committed Jul 13, 2024
1 parent 64575c3 commit 89bc701
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions pkgs/by-name/oq/oqs-provider/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ 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)"
'';

enableParallelBuilding = true;

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.x86;
};
})

0 comments on commit 89bc701

Please sign in to comment.