nixpkgs/pkgs/tools/security/secp256k1/default.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
}:
2019-08-13 23:52:01 +02:00
stdenv.mkDerivation {
pname = "secp256k1";
2016-06-04 19:55:15 +02:00
# I can't find any version numbers, so we're just using the date of the
# last commit.
version = "unstable-2021-06-06";
2016-06-04 19:55:15 +02:00
src = fetchFromGitHub {
owner = "bitcoin-core";
repo = "secp256k1";
rev = "7973576f6e3ab27d036a09397152b124d747f4ae";
sha256 = "0vjk55dv0mkph4k6bqgkykmxn05ngzvhc4rzjnvn33xzi8dzlvah";
2016-06-04 19:55:15 +02:00
};
nativeBuildInputs = [ autoreconfHook ];
2016-06-04 19:55:15 +02: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 19:55:15 +02:00
2020-08-19 14:42:25 +02:00
doCheck = true;
2020-08-19 14:42:25 +02:00
checkPhase = "./tests";
meta = with lib; {
2016-06-04 19:55:15 +02:00
description = "Optimized C library for EC operations on curve secp256k1";
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.
2016-06-04 19:55:15 +02:00
'';
homepage = "https://github.com/bitcoin-core/secp256k1";
2016-06-04 19:55:15 +02:00
license = with licenses; [ mit ];
maintainers = with maintainers; [ ];
platforms = with platforms; unix;
2016-06-04 19:55:15 +02:00
};
}