nixpkgs/pkgs/development/python-modules/keepkey/default.nix
aszlig 1f65182272
electrum: Unify protobuf dependencies
Since 9c57f3b5c0 bumped the protobuf
version because the new upstream requires it, electrum now gets
protobuf3_0 *and* protobuf3_2 instead of just one version.

This leads to the following build errer:

Found duplicated packages in closure for dependency 'protobuf':
  protobuf 3.0.2 (...-python2.7-protobuf-3.0.2/lib/python2.7/site-packages)
  protobuf 3.2.0 (...-python2.7-protobuf-3.2.0/lib/python2.7/site-packages)

Using protobuf3_2 for keepkey and electrum fixes the build.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @np
2017-06-22 21:06:17 +02:00

30 lines
794 B
Nix

{ stdenv, fetchPypi, buildPythonPackage, ecdsa
, mnemonic, protobuf3_2, hidapi }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "keepkey";
version = "0.7.3";
src = fetchPypi {
inherit pname version;
sha256 = "14d2r8dlx997ypgma2k8by90acw7i3l7hfq4gar9lcka0lqfj714";
};
propagatedBuildInputs = [ protobuf3_2 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 ];
};
}