From 337b3f232a95e6104e65cdd2874698d68571c4ef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 09:56:25 +0100 Subject: [PATCH 1/2] python3Packages.fixerio: init at 0.1.1 --- .../python-modules/fixerio/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/fixerio/default.nix diff --git a/pkgs/development/python-modules/fixerio/default.nix b/pkgs/development/python-modules/fixerio/default.nix new file mode 100644 index 00000000000..786681df1c8 --- /dev/null +++ b/pkgs/development/python-modules/fixerio/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, pytestCheckHook +, httpretty +}: + +buildPythonPackage rec { + pname = "fixerio"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "amatellanes"; + repo = pname; + rev = "v${version}"; + sha256 = "1k9ss5jc7sbpkjd2774vbmvljny0wm2lrc8155ha8yk2048jsaxk"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "requests==2.10.0" "requests" + ''; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + httpretty + pytestCheckHook + ]; + + pythonImportsCheck = [ "fixerio" ]; + + meta = with lib; { + description = "Python client for Fixer.io"; + longDescription = '' + Fixer.io is a free JSON API for current and historical foreign + exchange rates published by the European Central Bank. + ''; + homepage = "https://github.com/amatellanes/fixerio"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad775f0712b..da883567223 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2149,6 +2149,8 @@ in { fitbit = callPackage ../development/python-modules/fitbit { }; + fixerio = callPackage ../development/python-modules/fixerio { }; + fixtures = callPackage ../development/python-modules/fixtures { }; flake8-blind-except = callPackage ../development/python-modules/flake8-blind-except { }; From fe5edc033d7f32628c3c74a44e3d5fc8407000a2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 7 Jan 2021 09:57:53 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6df1239537e..f89a8b88aad 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -256,7 +256,7 @@ "fireservicerota" = ps: with ps; [ ]; # missing inputs: pyfireservicerota "firmata" = ps: with ps; [ ]; # missing inputs: pymata-express "fitbit" = ps: with ps; [ aiohttp-cors fitbit ]; - "fixer" = ps: with ps; [ ]; # missing inputs: fixerio + "fixer" = ps: with ps; [ fixerio ]; "fleetgo" = ps: with ps; [ ]; # missing inputs: ritassist "flexit" = ps: with ps; [ ]; # missing inputs: pyflexit pymodbus "flic" = ps: with ps; [ ]; # missing inputs: pyflic-homeassistant