2022-03-03 07:12:58 -08:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
2019-08-05 00:50:55 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "secp256k1";
|
|
|
|
|
2022-03-03 07:12:58 -08:00
|
|
|
version = "2021-12-03";
|
2019-08-05 00:50:55 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitcoin-core";
|
|
|
|
repo = "secp256k1";
|
2022-03-03 07:12:58 -08:00
|
|
|
rev = "490022745164b56439688b0fc04f9bd43578e5c3";
|
|
|
|
hash = "sha256-6CmGWiecthaGWSKX7VHWj5zvDAwVE9U5YOo9JRJWYwI=";
|
2019-08-05 00:50:55 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2022-03-03 07:12:58 -08: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 00:50:55 -07:00
|
|
|
|
2021-03-22 06:38:32 -07:00
|
|
|
meta = with lib; {
|
2019-08-05 00:50:55 -07:00
|
|
|
description = "Optimized C library for EC operations on curve secp256k1";
|
2022-03-03 07:12:58 -08: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 00:50:55 -07:00
|
|
|
homepage = "https://github.com/bitcoin-core/secp256k1";
|
2022-03-03 07:12:58 -08:00
|
|
|
license = with licenses; [ mit ];
|
2019-08-05 00:50:55 -07:00
|
|
|
maintainers = with maintainers; [ nixbitcoin ];
|
2022-03-03 07:12:58 -08:00
|
|
|
platforms = with platforms; unix;
|
2019-08-05 00:50:55 -07:00
|
|
|
};
|
|
|
|
}
|