Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 31 lines 1.1 kB view raw
1{ stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }: 2 3buildPythonPackage rec { 4 pname = "bitcoinlib"; 5 version = "0.12.0"; 6 7 disabled = !isPy3k; 8 9 src = fetchFromGitHub { 10 owner = "petertodd"; 11 repo = "python-bitcoinlib"; 12 rev = "refs/tags/python-bitcoinlib-v${version}"; 13 hash = "sha256-jguybrH86z6NWLaucQEYjvH2Gkoh3Aqh/PLZ6l8Qel4="; 14 }; 15 16 postPatch = '' 17 substituteInPlace bitcoin/core/key.py --replace \ 18 "ctypes.util.find_library('ssl.35') or ctypes.util.find_library('ssl') or 'libeay32'" \ 19 "'${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'" 20 ''; 21 22 pythonImportsCheck = [ "bitcoin" "bitcoin.core.key" ]; 23 24 meta = with lib; { 25 homepage = "https://github.com/petertodd/python-bitcoinlib"; 26 description = "Easy interface to the Bitcoin data structures and protocol"; 27 changelog = "https://github.com/petertodd/python-bitcoinlib/raw/${src.rev}/release-notes.md"; 28 license = with licenses; [ lgpl3Plus ]; 29 maintainers = with maintainers; [ jb55 ]; 30 }; 31}