1 { lib, stdenv, fetchurl, autoreconfHook
5 stdenv.mkDerivation (finalAttrs: {
10 url = "https://download.libsodium.org/libsodium/releases/libsodium-${finalAttrs.version}.tar.gz";
11 hash = "sha256-67Ze9spDkzPCu0GgwZkFhyiNoH9sf9B8s6GMwY0wzhk=";
14 outputs = [ "out" "dev" ];
16 nativeBuildInputs = [ autoreconfHook ];
18 separateDebugInfo = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "musl";
20 enableParallelBuilding = true;
21 hardeningDisable = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "stackprotector";
23 # FIXME: the hardeingDisable attr above does not seems effective, so
24 # the need to disable stackprotector via configureFlags
25 configureFlags = lib.optional (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) "--disable-ssp";
29 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
32 description = "Modern and easy-to-use crypto library";
33 homepage = "https://doc.libsodium.org/";
34 license = licenses.isc;
35 maintainers = with maintainers; [ raskin ];
36 pkgConfigModules = [ "libsodium" ];
37 platforms = platforms.all;