summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorrnhmjoj <micheleguerinirocco@me.com>2017-05-30 21:35:32 +0200
committerrnhmjoj <micheleguerinirocco@me.com>2017-05-30 21:36:31 +0200
commite73f9953af03f9cbc3878108ea44197fecb9d488 (patch)
treec12f8f3c52342a7c9f5d91f5ebd17c48ce120df8 /pkgs/development/python-modules
parent3f9b6ddbf52386259b09d1697c1637b635463e96 (diff)
downloadnixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar.gz
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar.bz2
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar.lz
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar.xz
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.tar.zst
nixlib-e73f9953af03f9cbc3878108ea44197fecb9d488.zip
move libraries to pkgs/development/python-modules
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/ecpy.nix21
-rw-r--r--pkgs/development/python-modules/ed25519.nix18
-rw-r--r--pkgs/development/python-modules/hidapi.nix30
-rw-r--r--pkgs/development/python-modules/keepkey.nix31
-rw-r--r--pkgs/development/python-modules/ledgerblue.nix22
-rw-r--r--pkgs/development/python-modules/libagent.nix25
-rw-r--r--pkgs/development/python-modules/semver.nix18
-rw-r--r--pkgs/development/python-modules/trezor.nix9
8 files changed, 170 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/ecpy.nix b/pkgs/development/python-modules/ecpy.nix
new file mode 100644
index 000000000000..56e815d17b37
--- /dev/null
+++ b/pkgs/development/python-modules/ecpy.nix
@@ -0,0 +1,21 @@
+{ 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
new file mode 100644
index 000000000000..dfbf6e3f2c39
--- /dev/null
+++ b/pkgs/development/python-modules/ed25519.nix
@@ -0,0 +1,18 @@
+{ 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
new file mode 100644
index 000000000000..93603ed576db
--- /dev/null
+++ b/pkgs/development/python-modules/hidapi.nix
@@ -0,0 +1,30 @@
+{ 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
new file mode 100644
index 000000000000..5869bd40a634
--- /dev/null
+++ b/pkgs/development/python-modules/keepkey.nix
@@ -0,0 +1,31 @@
+{ 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
new file mode 100644
index 000000000000..fff2ed965d0c
--- /dev/null
+++ b/pkgs/development/python-modules/ledgerblue.nix
@@ -0,0 +1,22 @@
+{ 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
new file mode 100644
index 000000000000..34ff23777026
--- /dev/null
+++ b/pkgs/development/python-modules/libagent.nix
@@ -0,0 +1,25 @@
+{ 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
new file mode 100644
index 000000000000..e9dcbd373c5e
--- /dev/null
+++ b/pkgs/development/python-modules/semver.nix
@@ -0,0 +1,18 @@
+{ 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 70160dcb0f94..87ee7160017c 100644
--- a/pkgs/development/python-modules/trezor.nix
+++ b/pkgs/development/python-modules/trezor.nix
@@ -1,4 +1,5 @@
-{ lib, fetchurl, buildPythonPackage, protobuf3_0, hidapi, ecdsa, mnemonic }:
+{ stdenv, fetchurl, buildPythonPackage
+, protobuf3_0, hidapi, ecdsa, mnemonic }:
 
 buildPythonPackage rec {
   pname = "trezor";
@@ -17,10 +18,10 @@ buildPythonPackage rec {
   # There are no actual tests: "ImportError: No module named tests"
   doCheck = false;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
     homepage = https://github.com/trezor/python-trezor;
-    license = lib.licenses.gpl3;
-    maintainers = with lib.maintainers; [ np ];
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ np ];
   };
 }