Merge pull request #16463 from FRidh/secp
secp256k1: init (native lib, and python ffi bindings at 0.12.1)
This commit is contained in:
commit
81d798bc36
35
pkgs/tools/security/secp256k1/default.nix
Normal file
35
pkgs/tools/security/secp256k1/default.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, ... }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "secp256k1-${version}";
|
||||||
|
|
||||||
|
# I can't find any version numbers, so we're just using the date
|
||||||
|
# of the last commit.
|
||||||
|
version = "2016-05-30";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "bitcoin-core";
|
||||||
|
repo = "secp256k1";
|
||||||
|
rev = "b3be8521e694eaf45dd29baea035055183c42fe2";
|
||||||
|
sha256 = "1pgsy72w87yxbiqn96hnm8alsfx3rj7d9jlzdsypyf6i1rf6w4bq";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ autoconf automake libtool ];
|
||||||
|
|
||||||
|
configureFlags = [ "--enable-module-recovery" ];
|
||||||
|
|
||||||
|
preConfigure = "./autogen.sh";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
homepage = https://github.com/bitcoin-core/secp256k1;
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
maintainers = with maintainers; [ chris-martin ];
|
||||||
|
};
|
||||||
|
}
|
@ -3392,6 +3392,8 @@ in
|
|||||||
|
|
||||||
seccure = callPackage ../tools/security/seccure { };
|
seccure = callPackage ../tools/security/seccure { };
|
||||||
|
|
||||||
|
secp256k1 = callPackage ../tools/security/secp256k1 { };
|
||||||
|
|
||||||
securefs = callPackage ../tools/filesystems/securefs { };
|
securefs = callPackage ../tools/filesystems/securefs { };
|
||||||
|
|
||||||
setroot = callPackage ../tools/X11/setroot { };
|
setroot = callPackage ../tools/X11/setroot { };
|
||||||
|
@ -4476,11 +4476,11 @@ in modules // {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pytest_28 = self.pytest_27.override rec {
|
pytest_28 = self.pytest_27.override rec {
|
||||||
name = "pytest-2.8.6";
|
name = "pytest-2.8.7";
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "mirror://pypi/p/pytest/${name}.tar.gz";
|
url = "mirror://pypi/p/pytest/${name}.tar.gz";
|
||||||
sha256 = "ed38a3725b8e4478555dfdb549a4219ca3ba57955751141a1aaa45b706d84194";
|
sha256 = "1bwb06g64x2gky8x5hcrfpg6r351xwvafimnhm5qxq7wajz8ck7w";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -21688,6 +21688,40 @@ in modules // {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
secp256k1 = buildPythonPackage rec {
|
||||||
|
name = "secp256k1-${version}";
|
||||||
|
version = "0.12.1";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "mirror://pypi/s/secp256k1/${name}.tar.gz";
|
||||||
|
sha256 = "0zrjxvzxqm4bz2jcy8sras8jircgbs6dkrw8j3nc6jhvzlikwwxl";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.pkgconfig self.pytest_28 self.pytestrunner ];
|
||||||
|
propagatedBuildInputs = [ self.cffi pkgs.secp256k1 ];
|
||||||
|
|
||||||
|
# Tests are not included in archive
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
cp -r ${pkgs.secp256k1.src} libsecp256k1
|
||||||
|
touch libsecp256k1/autogen.sh
|
||||||
|
export INCLUDE_DIR=${pkgs.secp256k1}/include
|
||||||
|
export LIB_DIR=${pkgs.secp256k1}/lib
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
py.test tests
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/ludbb/secp256k1-py;
|
||||||
|
description = "Python FFI bindings for secp256k1";
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
maintainers = with maintainers; [ chris-martin ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
semantic-version = buildPythonPackage rec {
|
semantic-version = buildPythonPackage rec {
|
||||||
name = "semantic_version-2.4.2";
|
name = "semantic_version-2.4.2";
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
|
Loading…
Reference in New Issue
Block a user