python.pkgs.bitcoinlib: support darwin

This commit is contained in:
Orivej Desh 2017-12-24 05:15:58 +00:00
parent 9d70b99dfe
commit 159a72bd55

View File

@ -1,6 +1,7 @@
{ lib, buildPythonPackage, fetchFromGitHub, openssl }:
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, openssl }:
buildPythonPackage rec {
let ext = if stdenv.isDarwin then "dylib" else "so";
in buildPythonPackage rec {
pname = "bitcoinlib";
version = "0.9.0";
name = "${pname}-${version}";
@ -15,7 +16,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace bitcoin/core/key.py --replace \
"ctypes.util.find_library('ssl') or 'libeay32'" \
"\"${openssl.out}/lib/libssl.so\""
"'${openssl.out}/lib/libssl.${ext}'"
'';
meta = {