diff options
Diffstat (limited to 'pkgs/tools/security/secp256k1')
-rw-r--r-- | pkgs/tools/security/secp256k1/default.nix | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/pkgs/tools/security/secp256k1/default.nix b/pkgs/tools/security/secp256k1/default.nix index a8acf3586c9e2..6953151cbe2cd 100644 --- a/pkgs/tools/security/secp256k1/default.nix +++ b/pkgs/tools/security/secp256k1/default.nix @@ -1,45 +1,37 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, jdk - -# Enable ECDSA pubkey recovery module -, enableRecovery ? true - -# Enable ECDH shared secret computation (disabled by default because it is -# experimental) -, enableECDH ? false - -# Enable libsecp256k1_jni (disabled by default because it requires a jdk, -# which is a large dependency) -, enableJNI ? false - +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook }: -let inherit (lib) optionals; in - stdenv.mkDerivation { pname = "secp256k1"; # I can't find any version numbers, so we're just using the date of the # last commit. - version = "2020-08-16"; + version = "unstable-2021-06-06"; src = fetchFromGitHub { owner = "bitcoin-core"; repo = "secp256k1"; - rev = "670cdd3f8be25f81472b2d16dcd228b0d24a5c45"; - sha256 = "0ak2hrr0wznl5d9s905qwn5yds7k22i28d2jp957l4a8yf8cqv3s"; + rev = "7973576f6e3ab27d036a09397152b124d747f4ae"; + sha256 = "0vjk55dv0mkph4k6bqgkykmxn05ngzvhc4rzjnvn33xzi8dzlvah"; }; - buildInputs = optionals enableJNI [ jdk ]; - nativeBuildInputs = [ autoreconfHook ]; - configureFlags = - [ "--enable-benchmark=no" "--enable-tests=yes" "--enable-exhaustive-tests=no" ] ++ - optionals enableECDH [ "--enable-module-ecdh" "--enable-experimental" ] ++ - optionals enableRecovery [ "--enable-module-recovery" ] ++ - optionals enableJNI [ "--enable-jni" ]; + configureFlags = [ + "--enable-benchmark=no" + "--enable-exhaustive-tests=no" + "--enable-experimental" + "--enable-module-ecdh" + "--enable-module-recovery" + "--enable-module-schnorrsig" + "--enable-tests=yes" + ]; doCheck = true; + checkPhase = "./tests"; meta = with lib; { |