-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathlibsodium.nix
31 lines (23 loc) · 906 Bytes
/
libsodium.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, lib, autoreconfHook, src }:
stdenv.mkDerivation rec {
pname = "libsodium-vrf";
version = src.shortRev;
inherit src;
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [ "--enable-static" ]
# Fixes a compilation failure: "undefined reference to `__memcpy_chk'". Note
# that the more natural approach of adding "stackprotector" to
# `hardeningDisable` does not resolve the issue.
++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector";
outputs = [ "out" "dev" ];
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
description = "A modern and easy-to-use crypto library - VRF fork";
homepage = "http://doc.libsodium.org/";
license = licenses.isc;
maintainers = [ "tdammers" "nclarke" ];
platforms = platforms.all;
};
}