From 3339ab31e5d5810d93a1530e4540adfce0d20b65 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 22:54:47 +0100 Subject: [PATCH 01/12] pythonPackages.hidapi: init at 0.7.99.post12 --- pkgs/top-level/python-packages.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cace35cb1acb..60e9056448a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -24939,4 +24939,31 @@ 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 ]; + }; + }; } From a9f45a9cae3b46683f46393913c2fa076cf34614 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 22:55:32 +0100 Subject: [PATCH 02/12] pythonPackages.mnemonic: init at 0.12 --- pkgs/top-level/python-packages.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 60e9056448a5..4408d6022418 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -24966,4 +24966,23 @@ in modules // { 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 ]; + }; + }; } From ac69de8537a08d5583e432c6ae87653c19a4491a Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 22:56:33 +0100 Subject: [PATCH 03/12] pythonPackages.ecdsa: 0.11 -> 0.13 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4408d6022418..b32afc415de5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8248,11 +8248,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 From 4429139c727655b9abe7c26ce09f4dd59b634984 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 22:58:27 +0100 Subject: [PATCH 04/12] pythonPackages.trezor: init at 0.6.11 --- pkgs/top-level/python-packages.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b32afc415de5..b8a17176a3e0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -24985,4 +24985,28 @@ in modules // { 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 ]; + }; + }; } From 50cc9421a2d251a2997930177762e8000d1cec68 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 22:59:47 +0100 Subject: [PATCH 05/12] pythonPackages.ed25519: init at 1.4 --- pkgs/top-level/python-packages.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b8a17176a3e0..954753e874bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25009,4 +25009,21 @@ in modules // { maintainer = 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 ]; + }; + }; } From aa1094481310bfbb4cf698692c95bf36d4c30b2d Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:24:57 +0100 Subject: [PATCH 06/12] pythonPackages.keepkey: init at 0.7.0 --- pkgs/top-level/python-packages.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 954753e874bc..9741b7813a57 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25010,6 +25010,30 @@ in modules // { }; }; + 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 ]; + }; + }; + ed25519 = buildPythonPackage rec { name = "ed25519-${version}"; version = "1.4"; From 9a547777e9078ab6128c0a4629bc8146cc9f0d25 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:31:39 +0100 Subject: [PATCH 07/12] pythonPackages.semver: init at 2.2.1 --- pkgs/top-level/python-packages.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9741b7813a57..76da4896e07d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25034,6 +25034,23 @@ in modules // { }; }; + 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"; From c8cf9455b77f772fd631ae236ff7436d421632f0 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:32:19 +0100 Subject: [PATCH 08/12] pythonPackages.trezor_agent: init at 0.6.1 --- pkgs/top-level/python-packages.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 76da4896e07d..f6ffd73ae6a3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25067,4 +25067,24 @@ in modules // { 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 ]; + }; + }; + } From c0fcb321e2cd3158f4254d44e1e62bb7b9fe1889 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:32:57 +0100 Subject: [PATCH 09/12] pythonPackages.x11_hash: init at 1.4 --- pkgs/top-level/python-packages.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f6ffd73ae6a3..65fadfba92e9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -25087,4 +25087,21 @@ in modules // { }; }; + 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 ]; + }; + }; + } From 65836c898fb9282c724ac297e7e61eb8deebc1ff Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:58:28 +0100 Subject: [PATCH 10/12] electrum: add plugin dependencies (trezor, keepkey) --- pkgs/applications/misc/electrum/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index df997ad6e0b5..632ae689f31f 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -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 ]; }; } From 2238ca0a5b63406689251fcfd56933177f1e43ae Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 21 Jan 2016 23:59:30 +0100 Subject: [PATCH 11/12] electrum-dash: init at 2.4.1 --- .../misc/electrum-dash/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/applications/misc/electrum-dash/default.nix diff --git a/pkgs/applications/misc/electrum-dash/default.nix b/pkgs/applications/misc/electrum-dash/default.nix new file mode 100644 index 000000000000..f046ecc9bf2d --- /dev/null +++ b/pkgs/applications/misc/electrum-dash/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c294f8be31c8..23132f96cc6e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11574,6 +11574,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 { }; From 11f948a89b7b731f9b2e2e7051a84dd5b6bd21bb Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Sun, 24 Jan 2016 19:58:39 +0100 Subject: [PATCH 12/12] pythonPackages.pyjwt: 0.3.2 -> 1.4.0 --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65fadfba92e9..14ab624a5618 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16323,7 +16323,7 @@ in modules // { }; pyjwt = buildPythonPackage rec { - version = "0.3.2"; + version = "1.4.0"; name = "pyjwt-${version}"; src = pkgs.fetchurl {