python.pkgs.secp256k1: move expression
This commit is contained in:
parent
24e2e6d67d
commit
e3581626ef
44
pkgs/development/python-modules/secp256k1/default.nix
Normal file
44
pkgs/development/python-modules/secp256k1/default.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pkgconfig
|
||||||
|
, pytest_28
|
||||||
|
, pytestrunner
|
||||||
|
, cffi
|
||||||
|
, secp256k1
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "secp256k1";
|
||||||
|
version = "0.12.1";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "0zrjxvzxqm4bz2jcy8sras8jircgbs6dkrw8j3nc6jhvzlikwwxl";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
buildInputs = [ pytest_28 pytestrunner ];
|
||||||
|
propagatedBuildInputs = [ cffi secp256k1 ];
|
||||||
|
|
||||||
|
# Tests are not included in archive
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
cp -r ${secp256k1.src} libsecp256k1
|
||||||
|
touch libsecp256k1/autogen.sh
|
||||||
|
export INCLUDE_DIR=${secp256k1}/include
|
||||||
|
export LIB_DIR=${secp256k1}/lib
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
py.test tests
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/ludbb/secp256k1-py;
|
||||||
|
description = "Python FFI bindings for secp256k1";
|
||||||
|
license = with lib.licenses; [ mit ];
|
||||||
|
maintainers = with lib.maintainers; [ chris-martin ];
|
||||||
|
};
|
||||||
|
}
|
@ -16746,39 +16746,8 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
secp256k1 = buildPythonPackage rec {
|
secp256k1 = callPackage ../development/python-modules/secp256k1 {
|
||||||
name = "secp256k1-${version}";
|
inherit (pkgs) secp256k1 pkgconfig;
|
||||||
version = "0.12.1";
|
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "mirror://pypi/s/secp256k1/${name}.tar.gz";
|
|
||||||
sha256 = "0zrjxvzxqm4bz2jcy8sras8jircgbs6dkrw8j3nc6jhvzlikwwxl";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.pkgconfig ];
|
|
||||||
buildInputs = [ 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 = callPackage ../development/python-modules/semantic-version { };
|
semantic-version = callPackage ../development/python-modules/semantic-version { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user