1 { lib, stdenv, fetchurl }:
3 stdenv.mkDerivation rec {
4 name = "libsodium-1.0.18";
7 url = "https://download.libsodium.org/libsodium/releases/${name}.tar.gz";
8 sha256 = "1h9ncvj23qbbni958knzsli8dvybcswcjbx0qjjgi922nf848l3g";
11 outputs = [ "out" "dev" ];
12 separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
14 enableParallelBuilding = true;
15 hardeningDisable = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "stackprotector";
17 # FIXME: the hardeingDisable attr above does not seems effective, so
18 # the need to disable stackprotector via configureFlags
19 configureFlags = lib.optional (stdenv.targetPlatform.isMusl && stdenv.targetPlatform.isx86_32) "--disable-ssp";
24 description = "A modern and easy-to-use crypto library";
25 homepage = "http://doc.libsodium.org/";
26 license = licenses.isc;
27 maintainers = with maintainers; [ raskin ];
28 platforms = platforms.all;