Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
libsodium,
|
|
liboprf,
|
|
testers,
|
|
nix-update-script,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libopaque";
|
|
version = "1.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "stef";
|
|
repo = "libopaque";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-VVD4489yWAJTWLGrpXYe8or5QjDnAuQ9/tzlNJJu/lo=";
|
|
};
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [
|
|
libsodium
|
|
liboprf
|
|
];
|
|
|
|
# expand_message_xmd has been renamed to oprf_expand_message_xmd in liboprf
|
|
# TODO: remove in the next release
|
|
postPatch = ''
|
|
substituteInPlace opaque.c \
|
|
--replace-fail 'expand_message_xmd' 'oprf_expand_message_xmd'
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p ${placeholder "out"}/lib/pkgconfig
|
|
cp ../libopaque.pc ${placeholder "out"}/lib/pkgconfig/
|
|
'';
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
passthru = {
|
|
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
description = "Implementation of the OPAQUE protocol with support for threshold variants";
|
|
homepage = "https://github.com/stef/libopaque/";
|
|
changelog = "https://github.com/stef/libopaque/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.lgpl3Plus;
|
|
teams = [ lib.teams.ngi ];
|
|
platforms = lib.platforms.unix;
|
|
pkgConfigModules = [ "libopaque" ];
|
|
};
|
|
})
|