Merge pull request #26289 from rnhmjoj/electrum

fix electrum dependencies (2nd try)
This commit is contained in:
Jörg Thalheim
2017-06-01 00:22:56 +01:00
committed by GitHub
10 changed files with 214 additions and 90 deletions

View File

@@ -0,0 +1,22 @@
{ stdenv, fetchPypi, buildPythonPackage, hidapi
, pycrypto, pillow, protobuf, future, ecpy
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "ECPy";
version = "0.8.1";
src = fetchPypi {
inherit pname version;
sha256 = "0ab60sx4bbsmccwmdvz1023r0cbzi4phar4ipzn5npdj5gw1ny4l";
};
buildInputs = [ hidapi pycrypto pillow protobuf future ];
meta = with stdenv.lib; {
description = "Pure Pyhton Elliptic Curve Library";
homepage = "https://github.com/ubinity/ECPy";
license = licenses.asl20;
};
}

View File

@@ -0,0 +1,19 @@
{ stdenv, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "ed25519";
version = "1.4";
src = fetchPypi {
inherit pname version;
sha256 = "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499";
};
meta = with stdenv.lib; {
description = "Ed25519 public-key signatures";
homepage = "https://github.com/warner/python-ed25519";
license = licenses.mit;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -0,0 +1,30 @@
{ stdenv, libusb1, udev, fetchPypi, buildPythonPackage, cython }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "hidapi";
version = "0.7.99.post20";
src = fetchPypi {
inherit pname version;
sha256 = "1k7z5m7xsqy8j4qkjy4pfxdx4hm36ha68vi65z6smvnyg4zgv22z";
};
propagatedBuildInputs = [ libusb1 udev cython ];
# Fix the USB backend library lookup
postPatch = ''
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
'';
meta = with stdenv.lib; {
description = "A Cython interface to the hidapi from https://github.com/signal11/hidapi";
homepage = https://github.com/trezor/cython-hidapi;
# license can actually be either bsd3 or gpl3
# see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt
license = licenses.bsd3;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -0,0 +1,30 @@
{ stdenv, fetchPypi, buildPythonPackage, ecdsa
, mnemonic, protobuf3_0, hidapi }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "keepkey";
version = "0.7.3";
src = fetchPypi {
inherit pname version;
sha256 = "14d2r8dlx997ypgma2k8by90acw7i3l7hfq4gar9lcka0lqfj714";
};
propagatedBuildInputs = [ protobuf3_0 hidapi ];
buildInputs = [ ecdsa mnemonic ];
# There are no actual tests: "ImportError: No module named tests"
doCheck = false;
# Remove impossible dependency constraint
postPatch = "sed -i -e 's|hidapi==|hidapi>=|' setup.py";
meta = with stdenv.lib; {
description = "KeepKey Python client";
homepage = https://github.com/keepkey/python-keepkey;
license = licenses.gpl3;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -0,0 +1,23 @@
{ stdenv, fetchPypi, buildPythonPackage, hidapi
, pycrypto, pillow, protobuf, future, ecpy
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "ledgerblue";
version = "0.1.13";
src = fetchPypi {
inherit pname version;
sha256 = "09bsiylvgax6m47w8r0myaf61xj9j0h1spvadx6fx31qy0iqicw0";
};
buildInputs = [ hidapi pycrypto pillow protobuf future ecpy ];
meta = with stdenv.lib; {
description = "Python library to communicate with Ledger Blue/Nano S";
homepage = "https://github.com/LedgerHQ/blue-loader-python";
license = licenses.asl20;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -0,0 +1,26 @@
{ stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa
, semver, keepkey, trezor, mnemonic, ledgerblue
}:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "libagent";
version = "0.9.1";
src = fetchPypi{
inherit pname version;
sha256 = "1g19lsid7lqw567w31fif89w088lzbgh27xpb1pshjk1gvags3bc";
};
buildInputs = [
ed25519 ecdsa semver keepkey
trezor mnemonic ledgerblue
];
meta = with stdenv.lib; {
description = "Using hardware wallets as SSH/GPG agent";
homepage = "https://github.com/romanz/trezor-agent";
license = licenses.gpl3;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -0,0 +1,21 @@
{ lib, fetchurl, buildPythonPackage, pbkdf2 }:
buildPythonPackage rec {
pname = "mnemonic";
version = "0.17";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://pypi/m/${pname}/${name}.tar.gz";
sha256 = "1hq6xb47jagfqf65iwcrh0065mj3521d2mxmahg7vfraihqyqdjn";
};
propagatedBuildInputs = [ pbkdf2 ];
meta = {
description = "Implementation of Bitcoin BIP-0039";
homepage = https://github.com/trezor/python-mnemonic;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ np ];
};
}

View File

@@ -0,0 +1,19 @@
{ stdenv, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "semver";
version = "2.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "161gvsfpw0l8lnf1v19rvqc8b9f8n70cc8ppya4l0n6rwc1c1n4m";
};
meta = with stdenv.lib; {
description = "Python package to work with Semantic Versioning (http://semver.org/)";
homepage = "https://github.com/k-bx/python-semver";
license = licenses.bsd3;
maintainers = with maintainers; [ np ];
};
}

View File

@@ -1,12 +1,12 @@
{ lib, fetchurl, buildPythonPackage, protobuf3_0, hidapi, ecdsa, mnemonic }:
{ lib, fetchPypi, buildPythonPackage, protobuf3_0, hidapi, ecdsa, mnemonic }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "trezor";
version = "0.7.13";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://pypi/t/${pname}/${name}.tar.gz";
src = fetchPypi {
inherit pname version;
sha256 = "d05f388bb56b6f61cc727999cc725078575238a0b6172450322bc55c437fefe5";
};