about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/fixerio/default.nix
blob: 8605d0f65da0411883c772cf1213c3cebcdba4a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, pytestCheckHook
, httpretty
, responses
}:

buildPythonPackage rec {
  pname = "fixerio";
  version = "1.0.0-alpha";

  src = fetchFromGitHub {
    owner = "amatellanes";
    repo = pname;
    rev = "v${version}";
    sha256 = "009h1mys175xdyznn5bl980vly40544s4ph1zcgqwg2i2ic93gvb";
  };

  propagatedBuildInputs = [
    requests
  ];

  checkInputs = [
    httpretty
    pytestCheckHook
    responses
  ];

  disabledTests = [
    # tests require network access
    "test_returns_historical_rates_for_symbols_passed_if_both"
    "test_returns_historical_rates_for_symbols_passed_in_constructor"
    "test_returns_historical_rates_for_symbols_passed_in_method"
    "test_returns_latest_rates_for_symbols_passed_in_constructor"
    "test_returns_latest_rates_for_symbols_passed_in_method"
    "test_returns_latest_rates_for_symbols_passed_in_method_if_both"
  ];

  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 ];
  };
}