depot/third_party/nixpkgs/pkgs/development/libraries/libsodium/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

30 lines
1,016 B
Nix

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