diff --git a/pkgs/development/python-modules/blockchain/default.nix b/pkgs/development/python-modules/blockchain/default.nix new file mode 100644 index 000000000000..e6d523c3c7b8 --- /dev/null +++ b/pkgs/development/python-modules/blockchain/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchPypi +, future +}: + +buildPythonPackage rec { + pname = "blockchain"; + version = "1.4.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "1qpbmz6dk5gx1996dswpipwhj6sp5j0dlfap012l46zqnvmkxanv"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "enum-compat" "" + ''; + + propagatedBuildInputs = [ + future + ]; + + # tests are interacting with the API and not mocking the calls + doCheck = false; + + pythonImportsCheck = [ "blockchain" ]; + + meta = with lib; { + description = "Python client Blockchain Bitcoin Developer API"; + homepage = "https://github.com/blockchain/api-v1-client-python"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 2d025d63dd45..c58b6a22106f 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -76,7 +76,7 @@ "beewi_smartclim" = ps: with ps; [ ]; # missing inputs: beewi_smartclim "bh1750" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense "binary_sensor" = ps: with ps; [ ]; - "bitcoin" = ps: with ps; [ ]; # missing inputs: blockchain + "bitcoin" = ps: with ps; [ blockchain ]; "bizkaibus" = ps: with ps; [ ]; # missing inputs: bizkaibus "blackbird" = ps: with ps; [ ]; # missing inputs: pyblackbird "blebox" = ps: with ps; [ ]; # missing inputs: blebox_uniapi diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e6bcc84826af..bfaef38b435f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -916,6 +916,8 @@ in { blivet = callPackage ../development/python-modules/blivet { }; + blockchain = callPackage ../development/python-modules/blockchain { }; + blockdiag = callPackage ../development/python-modules/blockdiag { }; blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # Added 2020-11-29