Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / bitcoinlib / default.nix
blob3b1ead8d8962b164e1a97edef937a18954c0ca43
1 { stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
3 buildPythonPackage rec {
4   pname = "bitcoinlib";
5   version = "0.12.2";
7   disabled = !isPy3k;
9   src = fetchFromGitHub {
10     owner = "petertodd";
11     repo = "python-bitcoinlib";
12     rev = "refs/tags/python-bitcoinlib-v${version}";
13     hash = "sha256-jfd2Buy6GSCH0ZeccRREC1NmlS6Mq1qtNv/NLNJOsX0=";
14   };
16   postPatch = ''
17     substituteInPlace bitcoin/core/key.py --replace \
18       "ctypes.util.find_library('ssl.35') or ctypes.util.find_library('ssl') or ctypes.util.find_library('libeay32')" \
19       "'${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'"
20   '';
22   pythonImportsCheck = [ "bitcoin" "bitcoin.core.key" ];
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   };