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
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
autoreconfHook,
|
|
testers,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libsodium";
|
|
version = "1.0.20";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.libsodium.org/libsodium/releases/libsodium-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-67Ze9spDkzPCu0GgwZkFhyiNoH9sf9B8s6GMwY0wzhk=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
separateDebugInfo = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "musl";
|
|
|
|
enableParallelBuilding = true;
|
|
hardeningDisable = lib.optional (
|
|
stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32
|
|
) "stackprotector";
|
|
|
|
# FIXME: the hardeingDisable attr above does not seems effective, so
|
|
# the need to disable stackprotector via configureFlags
|
|
configureFlags = lib.optional (
|
|
stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32
|
|
) "--disable-ssp";
|
|
|
|
doCheck = true;
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
meta = with lib; {
|
|
description = "Modern and easy-to-use crypto library";
|
|
homepage = "https://doc.libsodium.org/";
|
|
license = licenses.isc;
|
|
maintainers = with maintainers; [ raskin ];
|
|
pkgConfigModules = [ "libsodium" ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|