libhydrogen: init at 0-unstable-2025-04-06 (bbca575b) (#397183)

This commit is contained in:
Arne Keller
2025-04-12 11:38:13 +02:00
committed by GitHub
2 changed files with 72 additions and 0 deletions
+7
View File
@@ -23602,6 +23602,13 @@
githubId = 1901799;
name = "Nathan van Doorn";
};
tanya1866 = {
email = "tanyaarora@tutamail.com";
matrix = "@tanya1866:matrix.org";
github = "tanya1866";
githubId = 119473725;
name = "Tanya Arora";
};
taranarmo = {
email = "taranarmo@gmail.com";
github = "taranarmo";
+65
View File
@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
testers,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libhydrogen";
version = "0-unstable-2025-04-06";
src = fetchFromGitHub {
owner = "jedisct1";
repo = "libhydrogen";
rev = "bbca575b62510bfdc6dd927a4bfa7df4a51cb846";
hash = "sha256-sLOE3oR53hmvRqIPD5PU9Q04TFqw2KuWT1OQBA/KdRc=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [ pkg-config ];
enableParallelBuilding = true;
makeFlags = [
"PREFIX=${placeholder "out"}"
"INCLUDE_INSTALL_DIR=${placeholder "dev"}/include"
"LIBRARY_INSTALL_DIR=${placeholder "out"}/lib"
"PKGCONFIG_INSTALL_DIR=${placeholder "dev"}/lib/pkgconfig"
"lib"
];
checkTarget = "test";
postInstall = ''
mkdir -p "$dev/lib/pkgconfig"
cat > "$dev/lib/pkgconfig/libhydrogen.pc" <<EOF
Name: libhydrogen
Description: Lightweight cryptographic library
Version: ${finalAttrs.version}
Libs: -L$out/lib -lhydrogen
Cflags: -I$dev/include
EOF
'';
doCheck = true;
preCheck = ''
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
description = "Lightweight, secure, easy-to-use crypto library suitable for constrained environments";
homepage = "https://github.com/jedisct1/libhydrogen";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.tanya1866 ];
pkgConfigModules = [ "libhydrogen" ];
platforms = lib.platforms.all;
};
})