summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRobert Schütz <rschuetz17@gmail.com>2018-09-12 12:55:29 +0200
committerGitHub <noreply@github.com>2018-09-12 12:55:29 +0200
commitc15a94b6d13872b8ae5063c628c9383a931078ec (patch)
treec1782d7dbdaf95108dfcd6949e0358434ba04f66 /pkgs/development
parent5048b0d1f9e908665a01c35f49b2d9816128e089 (diff)
parent8d4afa5f2ef0fbdf042069ac71479bba1104bbc8 (diff)
downloadnixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar.gz
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar.bz2
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar.lz
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar.xz
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.tar.zst
nixlib-c15a94b6d13872b8ae5063c628c9383a931078ec.zip
Merge pull request #45644 from jluttine/update-rlp-1.0.2
pythonPackages.rlp: 1.0.1 -> 1.0.2 (with some new deps)
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/backports-shutil-which/default.nix24
-rw-r--r--pkgs/development/python-modules/eth-hash/default.nix45
-rw-r--r--pkgs/development/python-modules/eth-typing/default.nix35
-rw-r--r--pkgs/development/python-modules/eth-utils/default.nix35
-rw-r--r--pkgs/development/python-modules/ledgerblue/default.nix9
-rw-r--r--pkgs/development/python-modules/libagent/default.nix14
-rw-r--r--pkgs/development/python-modules/pymsgbox/default.nix24
-rw-r--r--pkgs/development/python-modules/python-u2flib-host/default.nix23
-rw-r--r--pkgs/development/python-modules/rlp/default.nix16
9 files changed, 211 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/backports-shutil-which/default.nix b/pkgs/development/python-modules/backports-shutil-which/default.nix
new file mode 100644
index 000000000000..9900f86567e0
--- /dev/null
+++ b/pkgs/development/python-modules/backports-shutil-which/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, pytest }:
+
+buildPythonPackage rec {
+  pname = "backports.shutil_which";
+  version = "3.5.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "16sa3adkf71862cb9pk747pw80a2f1v5m915ijb4fgj309xrlhyx";
+  };
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test test
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Backport of shutil.which from Python 3.3";
+    homepage = https://github.com/minrk/backports.shutil_which;
+    license = licenses.psfl;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/eth-hash/default.nix b/pkgs/development/python-modules/eth-hash/default.nix
new file mode 100644
index 000000000000..ce5fce1b1cba
--- /dev/null
+++ b/pkgs/development/python-modules/eth-hash/default.nix
@@ -0,0 +1,45 @@
+{ lib, fetchPypi, buildPythonPackage, pythonOlder, pytest, pysha3, pycrypto,
+  pycryptodome }:
+
+buildPythonPackage rec {
+  pname = "eth-hash";
+  version = "0.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0xpiz0wrxxj11ki9yapvsibl25qnki90bl3d39nqascg14nw17a9";
+  };
+
+  checkInputs = [ pytest ];
+
+  propagatedBuildInputs = [ pysha3 pycrypto pycryptodome ];
+
+  # setuptools-markdown uses pypandoc which is broken at the moment
+  preConfigure = ''
+    substituteInPlace setup.py --replace \'setuptools-markdown\' ""
+  '';
+
+  # Run tests separately because we don't want to run tests on tests/backends/
+  # but only on its selected subdirectories. Also, the directories under
+  # tests/backends/ must be run separately because they have identically named
+  # test files so pytest would raise errors because of that.
+  #
+  # Also, tests in tests/core/test_import.py are broken so just ignore them:
+  # https://github.com/ethereum/eth-hash/issues/25
+  # There is a pull request to fix the tests:
+  # https://github.com/ethereum/eth-hash/pull/26
+  checkPhase = ''
+    pytest tests/backends/pycryptodome/
+    pytest tests/backends/pysha3/
+    # pytest tests/core/
+  '';
+
+  disabled = pythonOlder "3.5";
+
+  meta = {
+    description = "The Ethereum hashing function keccak256";
+    homepage = https://github.com/ethereum/eth-hash;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/eth-typing/default.nix b/pkgs/development/python-modules/eth-typing/default.nix
new file mode 100644
index 000000000000..070923c83855
--- /dev/null
+++ b/pkgs/development/python-modules/eth-typing/default.nix
@@ -0,0 +1,35 @@
+{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder, pytest }:
+
+buildPythonPackage rec {
+  pname = "eth-typing";
+  version = "1.3.0";
+
+  # Tests are missing from the PyPI source tarball so let's use GitHub
+  # https://github.com/ethereum/eth-typing/issues/8
+  src = fetchFromGitHub {
+    owner = "ethereum";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0703z7vlsfa3dvgcq22f9rzmj0svyp2a8wc7h73d0aac28ydhpv9";
+  };
+
+  # setuptools-markdown uses pypandoc which is broken at the moment
+  preConfigure = ''
+    substituteInPlace setup.py --replace \'setuptools-markdown\' ""
+  '';
+
+  disabled = pythonOlder "3.5";
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    pytest .
+  '';
+
+  meta = {
+    description = "Common type annotations for Ethereum Python packages";
+    homepage = https://github.com/ethereum/eth-typing;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/eth-utils/default.nix b/pkgs/development/python-modules/eth-utils/default.nix
new file mode 100644
index 000000000000..cae3f34f0c9f
--- /dev/null
+++ b/pkgs/development/python-modules/eth-utils/default.nix
@@ -0,0 +1,35 @@
+{ lib, fetchFromGitHub, buildPythonPackage, pytest, eth-hash, eth-typing,
+  cytoolz, hypothesis }:
+
+buildPythonPackage rec {
+  pname = "eth-utils";
+  version = "1.2.1";
+
+  # Tests are missing from the PyPI source tarball so let's use GitHub
+  # https://github.com/ethereum/eth-utils/issues/130
+  src = fetchFromGitHub {
+    owner = "ethereum";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0g8f5vdjh7qd8kgsqqd9qkm6m79rx3w9yp0rf9vpdsv3xfzrkh1w";
+  };
+
+  checkInputs = [ pytest hypothesis ];
+  propagatedBuildInputs = [ eth-hash eth-typing cytoolz ];
+
+  # setuptools-markdown uses pypandoc which is broken at the moment
+  preConfigure = ''
+    substituteInPlace setup.py --replace \'setuptools-markdown\' ""
+  '';
+
+  checkPhase = ''
+    pytest .
+  '';
+
+  meta = {
+    description = "Common utility functions for codebases which interact with ethereum";
+    homepage = https://github.com/ethereum/eth-utils;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/ledgerblue/default.nix b/pkgs/development/python-modules/ledgerblue/default.nix
index 4f6c2a96c566..d324afcc647a 100644
--- a/pkgs/development/python-modules/ledgerblue/default.nix
+++ b/pkgs/development/python-modules/ledgerblue/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchPypi, buildPythonPackage, hidapi
-, pycrypto, pillow, protobuf, future, ecpy
+, pycrypto, pillow, protobuf, future, ecpy, python-u2flib-host, pycryptodomex
 }:
 
 buildPythonPackage rec {
@@ -11,7 +11,12 @@ buildPythonPackage rec {
     sha256 = "3969b3c375c0f3fb60ff1645621ebf2f39fb697a53851620705f27ed7b283097";
   };
 
-  buildInputs = [ hidapi pycrypto pillow protobuf future ecpy ];
+  propagatedBuildInputs = [
+    hidapi pycrypto pillow protobuf future ecpy python-u2flib-host pycryptodomex
+  ];
+
+  # No tests
+  doCheck = false;
 
   meta = with stdenv.lib; {
     description = "Python library to communicate with Ledger Blue/Nano S";
diff --git a/pkgs/development/python-modules/libagent/default.nix b/pkgs/development/python-modules/libagent/default.nix
index 950a0dd5ba6f..f70d538bb8d0 100644
--- a/pkgs/development/python-modules/libagent/default.nix
+++ b/pkgs/development/python-modules/libagent/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa
-, semver, keepkey, trezor, mnemonic, ledgerblue, unidecode, mock, pytest
-}:
+{ stdenv, fetchPypi, buildPythonPackage, ed25519, ecdsa , semver, mnemonic,
+  unidecode, mock, pytest , backports-shutil-which, ConfigArgParse,
+  pythondaemon, pymsgbox }:
 
 buildPythonPackage rec {
   pname = "libagent";
@@ -11,12 +11,8 @@ buildPythonPackage rec {
     sha256 = "55af1ad2a6c95aef1fc5588c2002c9e54edbb14e248776b64d00628235ceda3e";
   };
 
-  buildInputs = [
-    ed25519 ecdsa semver keepkey
-    trezor mnemonic ledgerblue
-  ];
-
-  propagatedBuildInputs = [ unidecode ];
+  propagatedBuildInputs = [ unidecode backports-shutil-which ConfigArgParse
+    pythondaemon pymsgbox ecdsa ed25519 mnemonic semver ];
 
   checkInputs = [ mock pytest ];
 
diff --git a/pkgs/development/python-modules/pymsgbox/default.nix b/pkgs/development/python-modules/pymsgbox/default.nix
new file mode 100644
index 000000000000..38cc411f54df
--- /dev/null
+++ b/pkgs/development/python-modules/pymsgbox/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchPypi, buildPythonPackage, tkinter }:
+
+buildPythonPackage rec {
+  pname = "PyMsgBox";
+  version = "1.0.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0kmd00w7p6maiyqpqqb2j8m6v2gh9c0h5i198pa02bc1c1m1321q";
+    extension = "zip";
+  };
+
+  propagatedBuildInputs = [ tkinter ];
+
+  # Finding tests fails
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A simple, cross-platform, pure Python module for JavaScript-like message boxes";
+    homepage = https://github.com/asweigart/PyMsgBox;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/python-u2flib-host/default.nix b/pkgs/development/python-modules/python-u2flib-host/default.nix
new file mode 100644
index 000000000000..38785d813138
--- /dev/null
+++ b/pkgs/development/python-modules/python-u2flib-host/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchPypi, buildPythonPackage, requests, hidapi }:
+
+buildPythonPackage rec {
+  pname = "python-u2flib-host";
+  version = "3.0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "02pwafd5kyjpc310ys0pgnd0adff1laz18naxxwsfrllqafqnrxb";
+  };
+
+  propagatedBuildInputs = [ requests hidapi ];
+
+  # Tests fail: "ValueError: underlying buffer has been detached"
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Python based U2F host library";
+    homepage = https://github.com/Yubico/python-u2flib-host;
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ jluttine ];
+  };
+}
diff --git a/pkgs/development/python-modules/rlp/default.nix b/pkgs/development/python-modules/rlp/default.nix
index 77ada95b3019..150234a3dd29 100644
--- a/pkgs/development/python-modules/rlp/default.nix
+++ b/pkgs/development/python-modules/rlp/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchPypi, buildPythonPackage, pytest }:
+{ lib, fetchPypi, buildPythonPackage, pytest, hypothesis, eth-utils }:
 
 buildPythonPackage rec {
   pname = "rlp";
@@ -9,8 +9,18 @@ buildPythonPackage rec {
     sha256 = "040fb5172fa23d27953a886c40cac989fc031d0629db934b5a9edcd2fb28df1e";
   };
 
-  checkInputs = [ pytest ];
-  propagatedBuildInputs = [ ];
+  checkInputs = [ pytest hypothesis ];
+  propagatedBuildInputs = [ eth-utils ];
+
+  # setuptools-markdown uses pypandoc which is broken at the moment
+  preConfigure = ''
+    substituteInPlace setup.py --replace \'setuptools-markdown\' ""
+    substituteInPlace setup.py --replace "long_description_markdown_filename='README.md'," ""
+  '';
+
+  checkPhase = ''
+    pytest .
+  '';
 
   meta = {
     description = "A package for encoding and decoding data in and from Recursive Length Prefix notation";