nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.1 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 setuptools, 6 pkg-config, 7 cffi, 8 secp256k1, 9 pytestCheckHook, 10}: 11 12buildPythonPackage (finalAttrs: { 13 pname = "python-secp256k1-cardano"; 14 version = "0.2.4"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "OpShin"; 19 repo = "python-secp256k1"; 20 tag = finalAttrs.version; 21 hash = "sha256-vYCg/VpuB0tR8LKT6AjAMXZGQDQkw1GjY5qIvPU1jVE="; 22 }; 23 24 nativeBuildInputs = [ pkg-config ]; 25 26 build-system = [ setuptools ]; 27 28 dependencies = [ 29 cffi 30 secp256k1 31 ]; 32 33 nativeCheckInputs = [ pytestCheckHook ]; 34 35 # Tests expect .so files and are failing 36 doCheck = false; 37 38 preConfigure = '' 39 cp -r ${secp256k1.src} libsecp256k1 40 export INCLUDE_DIR=${secp256k1}/include 41 export LIB_DIR=${secp256k1}/lib 42 ''; 43 44 meta = { 45 homepage = "https://github.com/OpShin/python-secp256k1"; 46 description = "Fork of python-secp256k1, fixing the commit hash of libsecp256k1 to a Cardano compatible version"; 47 license = with lib.licenses; [ mit ]; 48 maintainers = with lib.maintainers; [ aciceri ]; 49 }; 50})