Merge pull request #121707 from prusnak/secp256k1

secp256k1: (unstable-)2020-08-16 -> unstable-2021-06-06
This commit is contained in:
Sandro 2021-06-12 18:24:14 +02:00 committed by GitHub
commit b07cf14fcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 29 deletions

View file

@ -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; {

View file

@ -22740,10 +22740,7 @@ in
jnetmap = callPackage ../applications/networking/jnetmap {};
libbitcoin = callPackage ../tools/misc/libbitcoin/libbitcoin.nix {
secp256k1 = secp256k1.override { enableECDH = true; };
};
libbitcoin = callPackage ../tools/misc/libbitcoin/libbitcoin.nix { };
libbitcoin-protocol = callPackage ../tools/misc/libbitcoin/libbitcoin-protocol.nix { };
libbitcoin-client = callPackage ../tools/misc/libbitcoin/libbitcoin-client.nix { };
libbitcoin-network = callPackage ../tools/misc/libbitcoin/libbitcoin-network.nix { };