about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fixerio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/fixerio/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/fixerio/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/fixerio/default.nix b/nixpkgs/pkgs/development/python-modules/fixerio/default.nix
new file mode 100644
index 000000000000..786681df1c83
--- /dev/null
+++ b/nixpkgs/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 ];
+  };
+}