1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 isPy3k, 6 fetchFromGitHub, 7 openssl, 8}: 9 10buildPythonPackage rec { 11 pname = "python-bitcoinlib"; 12 version = "0.12.2"; 13 format = "setuptools"; 14 15 disabled = !isPy3k; 16 17 src = fetchFromGitHub { 18 owner = "petertodd"; 19 repo = "python-bitcoinlib"; 20 tag = "python-bitcoinlib-v${version}"; 21 hash = "sha256-jfd2Buy6GSCH0ZeccRREC1NmlS6Mq1qtNv/NLNJOsX0="; 22 }; 23 24 postPatch = '' 25 substituteInPlace bitcoin/core/key.py --replace \ 26 "ctypes.util.find_library('ssl.35') or ctypes.util.find_library('ssl') or ctypes.util.find_library('libeay32')" \ 27 "'${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'" 28 ''; 29 30 pythonImportsCheck = [ 31 "bitcoin" 32 "bitcoin.core.key" 33 ]; 34 35 meta = with lib; { 36 homepage = "https://github.com/petertodd/python-bitcoinlib"; 37 description = "Easy interface to the Bitcoin data structures and protocol"; 38 changelog = "https://github.com/petertodd/python-bitcoinlib/raw/${src.rev}/release-notes.md"; 39 license = with licenses; [ lgpl3Plus ]; 40 maintainers = with maintainers; [ jb55 ]; 41 }; 42}