From 62dbc738c570a3583e714cd48b389b4f4a130872 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 31 May 2017 08:33:02 +0200 Subject: [PATCH] Revert "fix electrum dependencies" --- pkgs/development/python-modules/ecpy.nix | 21 ---- pkgs/development/python-modules/ed25519.nix | 18 ---- pkgs/development/python-modules/hidapi.nix | 30 ------ pkgs/development/python-modules/keepkey.nix | 31 ------ .../development/python-modules/ledgerblue.nix | 22 ----- pkgs/development/python-modules/libagent.nix | 25 ----- pkgs/development/python-modules/semver.nix | 18 ---- pkgs/development/python-modules/trezor.nix | 9 +- pkgs/top-level/python-packages.nix | 95 ++++++++++++++++--- 9 files changed, 86 insertions(+), 183 deletions(-) delete mode 100644 pkgs/development/python-modules/ecpy.nix delete mode 100644 pkgs/development/python-modules/ed25519.nix delete mode 100644 pkgs/development/python-modules/hidapi.nix delete mode 100644 pkgs/development/python-modules/keepkey.nix delete mode 100644 pkgs/development/python-modules/ledgerblue.nix delete mode 100644 pkgs/development/python-modules/libagent.nix delete mode 100644 pkgs/development/python-modules/semver.nix diff --git a/pkgs/development/python-modules/ecpy.nix b/pkgs/development/python-modules/ecpy.nix deleted file mode 100644 index 56e815d17b37..000000000000 --- a/pkgs/development/python-modules/ecpy.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage, hidapi -, pycrypto, pillow, protobuf, future, ecpy -}: - -buildPythonPackage rec { - name = "ECPy-${version}"; - version = "0.8.1"; - - src = fetchurl { - url = "mirror://pypi/e/ecpy/${name}.tar.gz"; - 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.apache; - }; -} diff --git a/pkgs/development/python-modules/ed25519.nix b/pkgs/development/python-modules/ed25519.nix deleted file mode 100644 index dfbf6e3f2c39..000000000000 --- a/pkgs/development/python-modules/ed25519.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage }: - -buildPythonPackage rec { - name = "ed25519-${version}"; - version = "1.4"; - - src = fetchurl { - url = "mirror://pypi/e/ed25519/${name}.tar.gz"; - 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 ]; - }; -} diff --git a/pkgs/development/python-modules/hidapi.nix b/pkgs/development/python-modules/hidapi.nix deleted file mode 100644 index 93603ed576db..000000000000 --- a/pkgs/development/python-modules/hidapi.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, pkgs, libusb, udev -, fetchurl, buildPythonPackage, cython }: - -buildPythonPackage rec { - version = "0.7.99.post20"; - name = "hidapi-${version}"; - - src = fetchurl { - url = "mirror://pypi/h/hidapi/${name}.tar.gz"; - sha256 = "1k7z5m7xsqy8j4qkjy4pfxdx4hm36ha68vi65z6smvnyg4zgv22z"; - }; - - propagatedBuildInputs = [ pkgs.libusb1 pkgs.udev cython ]; - - # Fix the USB backend library lookup - postPatch = '' - libusb=${pkgs.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 ]; - }; -} diff --git a/pkgs/development/python-modules/keepkey.nix b/pkgs/development/python-modules/keepkey.nix deleted file mode 100644 index 5869bd40a634..000000000000 --- a/pkgs/development/python-modules/keepkey.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage, ecdsa -, mnemonic, protobuf3_0, hidapi }: - -buildPythonPackage rec{ - version = "0.7.3"; - name = "keepkey-${version}"; - - src = fetchurl { - url = "mirror://pypi/k/keepkey/${name}.tar.gz"; - 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 ]; - }; -} diff --git a/pkgs/development/python-modules/ledgerblue.nix b/pkgs/development/python-modules/ledgerblue.nix deleted file mode 100644 index fff2ed965d0c..000000000000 --- a/pkgs/development/python-modules/ledgerblue.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage, hidapi -, pycrypto, pillow, protobuf, future, ecpy -}: - -buildPythonPackage rec { - name = "ledgerblue-${version}"; - version = "0.1.13"; - - src = fetchurl { - url = "mirror://pypi/l/ledgerblue/${name}.tar.gz"; - 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.apache2; - maintainers = with maintainers; [ np ]; - }; -} diff --git a/pkgs/development/python-modules/libagent.nix b/pkgs/development/python-modules/libagent.nix deleted file mode 100644 index 34ff23777026..000000000000 --- a/pkgs/development/python-modules/libagent.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage, ed25519, ecdsa -, semver, keepkey, trezor, mnemonic, ledgerblue -}: - -buildPythonPackage rec { - name = "libagent-${version}"; - version = "0.9.1"; - - src = fetchurl { - url = "mirror://pypi/l/libagent/${name}.tar.gz"; - 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 ]; - }; -} diff --git a/pkgs/development/python-modules/semver.nix b/pkgs/development/python-modules/semver.nix deleted file mode 100644 index e9dcbd373c5e..000000000000 --- a/pkgs/development/python-modules/semver.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, fetchurl, buildPythonPackage }: - -buildPythonPackage rec { - name = "semver-${version}"; - version = "2.2.1"; - - src = fetchurl { - url = "mirror://pypi/s/semver/${name}.tar.gz"; - 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 ]; - }; -} diff --git a/pkgs/development/python-modules/trezor.nix b/pkgs/development/python-modules/trezor.nix index 87ee7160017c..70160dcb0f94 100644 --- a/pkgs/development/python-modules/trezor.nix +++ b/pkgs/development/python-modules/trezor.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, buildPythonPackage -, protobuf3_0, hidapi, ecdsa, mnemonic }: +{ lib, fetchurl, buildPythonPackage, protobuf3_0, hidapi, ecdsa, mnemonic }: buildPythonPackage rec { pname = "trezor"; @@ -18,10 +17,10 @@ buildPythonPackage rec { # There are no actual tests: "ImportError: No module named tests" doCheck = false; - meta = with stdenv.lib; { + meta = { description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet"; homepage = https://github.com/trezor/python-trezor; - license = licenses.gpl3; - maintainers = with maintainers; [ np ]; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ np ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd17887328cd..1f10fac50410 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -29626,37 +29626,106 @@ EOF }; }; - hidapi = callPackage ../development/python-modules/hidapi.nix { }; + hidapi = buildPythonPackage rec{ + version = "0.7.99.post15"; + name = "hidapi-${version}"; + + src = pkgs.fetchurl { + url = "mirror://pypi/h/hidapi/${name}.tar.gz"; + sha256 = "09wlr1d7mx80974bsq62j4pk80234jgl7ip4br0y43q6999dpcr0"; + }; + + propagatedBuildInputs = with self; [ pkgs.libusb1 pkgs.udev cython ]; + + # Fix the USB backend library lookup + postPatch = '' + libusb=${pkgs.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 = { + 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 ]; + }; + }; mnemonic = callPackage ../development/python-modules/mnemonic.nix { }; trezor = callPackage ../development/python-modules/trezor.nix { }; - keepkey = callPackage ../development/python-modules/keepkey.nix { }; + keepkey = buildPythonPackage rec{ + version = "0.7.3"; + name = "keepkey-${version}"; - semver = callPackage ../development/python-modules/semver.nix { }; + src = pkgs.fetchurl { + url = "mirror://pypi/k/keepkey/${name}.tar.gz"; + sha256 = "14d2r8dlx997ypgma2k8by90acw7i3l7hfq4gar9lcka0lqfj714"; + }; - ed25519 = callPackage ../development/python-modules/ed25519.nix { }; + propagatedBuildInputs = with self; [ protobuf3_0 hidapi ]; - libagent = callPackage ../development/python-modules/libagent.nix { }; + buildInputs = with self; [ ecdsa mnemonic ]; - ledgerblue = callPackage ../development/python-modules/ledgerblue.nix { }; + # There are no actual tests: "ImportError: No module named tests" + doCheck = false; - ecpy = callPackage ../development/python-modules/ecpy.nix { }; + meta = { + description = "KeepKey Python client"; + homepage = https://github.com/keepkey/python-keepkey; + license = licenses.gpl3; + maintainers = with maintainers; [ np ]; + }; + }; + + semver = buildPythonPackage rec { + name = "semver-${version}"; + version = "2.2.1"; + + src = pkgs.fetchurl { + url = "mirror://pypi/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 = "mirror://pypi/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.9.0"; + version = "0.7.0"; name = "trezor_agent-${version}"; src = pkgs.fetchurl { url = "mirror://pypi/t/trezor_agent/${name}.tar.gz"; - sha256 = "1i5cdamlf3c0ym600pjklij74p8ifj9cv7xrpnrfl1b8nkadswbz"; + sha256 = "1x1gwih6w8kxhpgmcp0v1k7mpmfsqiikkjca291sd0v2if24x7q1"; }; - propagatedBuildInputs = with self; [ - trezor libagent ecdsa ed25519 - mnemonic keepkey semver - ]; + propagatedBuildInputs = with self; [ trezor ecdsa ed25519 mnemonic keepkey semver ]; meta = { description = "Using Trezor as hardware SSH agent";