2021-05-04 15:37:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2016-09-18 18:29:32 +00:00
|
|
|
}:
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "secp256k1";
|
2016-06-04 17:55:15 +00:00
|
|
|
|
2016-09-18 18:29:32 +00:00
|
|
|
# I can't find any version numbers, so we're just using the date of the
|
|
|
|
# last commit.
|
2021-05-04 15:37:08 +00:00
|
|
|
version = "unstable-2021-06-06";
|
2016-06-04 17:55:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "secp256k1";
|
2021-05-04 15:37:08 +00:00
|
|
|
rev = "7973576f6e3ab27d036a09397152b124d747f4ae";
|
|
|
|
sha256 = "0vjk55dv0mkph4k6bqgkykmxn05ngzvhc4rzjnvn33xzi8dzlvah";
|
2016-06-04 17:55:15 +00:00
|
|
|
};
|
|
|
|
|
2016-09-18 18:29:32 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2016-06-04 17:55:15 +00:00
|
|
|
|
2021-05-04 15:37:08 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-benchmark=no"
|
|
|
|
"--enable-exhaustive-tests=no"
|
|
|
|
"--enable-experimental"
|
|
|
|
"--enable-module-ecdh"
|
|
|
|
"--enable-module-recovery"
|
|
|
|
"--enable-module-schnorrsig"
|
|
|
|
"--enable-tests=yes"
|
|
|
|
];
|
2016-06-04 17:55:15 +00:00
|
|
|
|
2020-08-19 12:42:25 +00:00
|
|
|
doCheck = true;
|
2021-05-04 15:37:08 +00:00
|
|
|
|
2020-08-19 12:42:25 +00:00
|
|
|
checkPhase = "./tests";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-04 17:55:15 +00:00
|
|
|
description = "Optimized C library for EC operations on curve secp256k1";
|
|
|
|
longDescription = ''
|
2016-09-18 18:29:32 +00:00
|
|
|
Optimized C library for EC operations on curve secp256k1. Part of
|
|
|
|
Bitcoin Core. This library is a work in progress and is being used
|
|
|
|
to research best practices. Use at your own risk.
|
2016-06-04 17:55:15 +00:00
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/bitcoin-core/secp256k1";
|
2016-06-04 17:55:15 +00:00
|
|
|
license = with licenses; [ mit ];
|
2021-06-06 08:37:32 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = with platforms; unix;
|
2016-06-04 17:55:15 +00:00
|
|
|
};
|
|
|
|
}
|