Skip to content

Commit

Permalink
python.pkgs.bitcoinlib: support darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
orivej committed Dec 24, 2017
1 parent 9d70b99 commit 159a72b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/development/python-modules/bitcoinlib/default.nix
@@ -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}";
Expand All @@ -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 = {
Expand Down

0 comments on commit 159a72b

Please sign in to comment.