mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
Merge pull request #12530 from np/python-trezor
New/updated python packages related to the TREZOR hardware wallet
This commit is contained in:
commit
0f80ba1fb4
44
pkgs/applications/misc/electrum-dash/default.nix
Normal file
44
pkgs/applications/misc/electrum-dash/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, slowaes }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "electrum-dash-${version}";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz";
|
||||
sha256 = "02k7m7fyn0cvlgmwxr2gag7rf2knllkch1ma58shysp7zx9jb000";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [
|
||||
dns
|
||||
ecdsa
|
||||
pbkdf2
|
||||
protobuf
|
||||
pyasn1
|
||||
pyasn1-modules
|
||||
pycrypto
|
||||
pyqt4
|
||||
qrcode
|
||||
requests
|
||||
slowaes
|
||||
tlslite
|
||||
x11_hash
|
||||
mnemonic
|
||||
|
||||
# plugins
|
||||
trezor
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share
|
||||
sed -i 's@usr_share = .*@usr_share = os.getenv("out")+"/share"@' setup.py
|
||||
pyrcc4 icons.qrc -o gui/qt/icons_rc.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Electrum DASH";
|
||||
homepage = https://github.com/dashpay/electrum-dash;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ np ];
|
||||
};
|
||||
}
|
@ -22,6 +22,14 @@ buildPythonPackage rec {
|
||||
requests
|
||||
slowaes
|
||||
tlslite
|
||||
|
||||
# plugins
|
||||
trezor
|
||||
keepkey
|
||||
# TODO plugins
|
||||
# matplotlib
|
||||
# btchip
|
||||
# amodem
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
@ -40,6 +48,6 @@ buildPythonPackage rec {
|
||||
'';
|
||||
homepage = https://electrum.org;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ ehmry joachifm ];
|
||||
maintainers = with maintainers; [ ehmry joachifm np ];
|
||||
};
|
||||
}
|
||||
|
@ -11580,6 +11580,8 @@ let
|
||||
|
||||
electrum = callPackage ../applications/misc/electrum { };
|
||||
|
||||
electrum-dash = callPackage ../applications/misc/electrum-dash { };
|
||||
|
||||
elinks = callPackage ../applications/networking/browsers/elinks { };
|
||||
|
||||
elvis = callPackage ../applications/editors/elvis { };
|
||||
|
@ -8249,11 +8249,11 @@ in modules // {
|
||||
|
||||
ecdsa = buildPythonPackage rec {
|
||||
name = "ecdsa-${version}";
|
||||
version = "0.11";
|
||||
version = "0.13";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/e/ecdsa/${name}.tar.gz";
|
||||
md5 = "8ef586fe4dbb156697d756900cb41d7c";
|
||||
sha256 = "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4";
|
||||
};
|
||||
|
||||
# Only needed for tests
|
||||
@ -16324,7 +16324,7 @@ in modules // {
|
||||
};
|
||||
|
||||
pyjwt = buildPythonPackage rec {
|
||||
version = "0.3.2";
|
||||
version = "1.4.0";
|
||||
name = "pyjwt-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
@ -24940,4 +24940,169 @@ in modules // {
|
||||
};
|
||||
};
|
||||
|
||||
hidapi = buildPythonPackage rec{
|
||||
version = "0.7.99.post12";
|
||||
name = "hidapi-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/h/hidapi/${name}.tar.gz";
|
||||
sha256 = "1jaj0y5vn5yk033q01wacsz379mf3sy66d6gz072ycfr5rahcp59";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ pkgs.libusb1 pkgs.udev cython ];
|
||||
|
||||
# Fix the USB backend library lookup
|
||||
postPatch = ''
|
||||
libusb=${pkgs.libusb1}/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 = {
|
||||
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;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
mnemonic = buildPythonPackage rec{
|
||||
version = "0.12";
|
||||
name = "mnemonic-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/m/mnemonic/${name}.tar.gz";
|
||||
sha256 = "0j5jm4v54135qqw455fw4ix2mhxhzjqvxji9gqkpxagk31cvbnj4";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ pbkdf2 ];
|
||||
|
||||
meta = {
|
||||
description = "Implementation of Bitcoin BIP-0039";
|
||||
homepage = https://github.com/trezor/python-mnemonic;
|
||||
license = licenses.mit;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
trezor = buildPythonPackage rec{
|
||||
version = "0.6.11";
|
||||
name = "trezor-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/t/trezor/${name}.tar.gz";
|
||||
sha256 = "0nqbjj0mvkp314hpq36px12hxbyidmhsdflq3121l4g9y3scfbnx";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ protobuf2_6 hidapi ];
|
||||
|
||||
buildInputs = with self; [ ecdsa mnemonic ];
|
||||
|
||||
# There are no actual tests: "ImportError: No module named tests"
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
|
||||
homepage = https://github.com/trezor/python-trezor;
|
||||
license = licenses.gpl3;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
keepkey = buildPythonPackage rec{
|
||||
version = "0.7.0";
|
||||
name = "keepkey-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/k/keepkey/${name}.tar.gz";
|
||||
sha256 = "1ikyp4jpydskznsrlwmxh9sn7b64aldwj2lf0phmb19r5kk06qmp";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ protobuf2_6 hidapi ];
|
||||
|
||||
buildInputs = with self; [ ecdsa mnemonic ];
|
||||
|
||||
# There are no actual tests: "ImportError: No module named tests"
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "KeepKey Python client";
|
||||
homepage = https://github.com/keepkey/python-keepkey;
|
||||
license = licenses.gpl3;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
semver = buildPythonPackage rec {
|
||||
name = "semver-${version}";
|
||||
version = "2.2.1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/s/semver/${name}.tar.gz";
|
||||
sha256 = "161gvsfpw0l8lnf1v19rvqc8b9f8n70cc8ppya4l0n6rwc1c1n4m";
|
||||
};
|
||||
|
||||
meta = {
|
||||
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 ];
|
||||
};
|
||||
};
|
||||
|
||||
ed25519 = buildPythonPackage rec {
|
||||
name = "ed25519-${version}";
|
||||
version = "1.4";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/e/ed25519/${name}.tar.gz";
|
||||
sha256 = "0ahx1nkxa0xis3cw0h5c4fpgv8mq4znkq7kajly33lc3317bk499";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Ed25519 public-key signatures";
|
||||
homepage = "https://github.com/warner/python-ed25519";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
trezor_agent = buildPythonPackage rec{
|
||||
version = "0.6.1";
|
||||
name = "trezor_agent-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/t/trezor_agent/${name}.tar.gz";
|
||||
sha256 = "0wpppxzld7kqqxdvy80qc8629n047vm3m3nk171i7hijfw285p0b";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ trezor ecdsa ed25519 mnemonic keepkey semver ];
|
||||
|
||||
meta = {
|
||||
description = "Using Trezor as hardware SSH agent";
|
||||
homepage = https://github.com/romanz/trezor-agent;
|
||||
license = licenses.gpl3;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
x11_hash = buildPythonPackage rec{
|
||||
version = "1.4";
|
||||
name = "x11_hash-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://pypi.python.org/packages/source/x/x11_hash/${name}.tar.gz";
|
||||
sha256 = "172skm9xbbrivy1p4xabxihx9lsnzi53hvzryfw64m799k2fmp22";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Binding for X11 proof of work hashing";
|
||||
homepage = https://github.com/mazaclub/x11_hash;
|
||||
license = licenses.mit;
|
||||
maintainer = with maintainers; [ np ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user