2022-03-03 15:12:58 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
2019-08-05 07:50:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "secp256k1";
|
|
|
|
|
2022-03-03 15:12:58 +00:00
|
|
|
version = "2021-12-03";
|
2019-08-05 07:50:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "secp256k1";
|
2022-03-03 15:12:58 +00:00
|
|
|
rev = "490022745164b56439688b0fc04f9bd43578e5c3";
|
|
|
|
hash = "sha256-6CmGWiecthaGWSKX7VHWj5zvDAwVE9U5YOo9JRJWYwI=";
|
2019-08-05 07:50:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2022-03-03 15:12:58 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-benchmark=no"
|
|
|
|
"--enable-exhaustive-tests=no"
|
|
|
|
"--enable-experimental"
|
|
|
|
"--enable-module-ecdh"
|
|
|
|
"--enable-module-recovery"
|
|
|
|
"--enable-module-schnorrsig"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = "./tests";
|
2019-08-05 07:50:55 +00:00
|
|
|
|
2021-03-22 13:38:32 +00:00
|
|
|
meta = with lib; {
|
2019-08-05 07:50:55 +00:00
|
|
|
description = "Optimized C library for EC operations on curve secp256k1";
|
2022-03-03 15:12:58 +00:00
|
|
|
longDescription = ''
|
|
|
|
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.
|
|
|
|
'';
|
2019-08-05 07:50:55 +00:00
|
|
|
homepage = "https://github.com/bitcoin-core/secp256k1";
|
2022-03-03 15:12:58 +00:00
|
|
|
license = with licenses; [ mit ];
|
2019-08-05 07:50:55 +00:00
|
|
|
maintainers = with maintainers; [ nixbitcoin ];
|
2022-03-03 15:12:58 +00:00
|
|
|
platforms = with platforms; unix;
|
2019-08-05 07:50:55 +00:00
|
|
|
};
|
|
|
|
}
|