1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, requests
5, pytestCheckHook
6, httpretty
7, responses
8}:
9
10buildPythonPackage rec {
11 pname = "fixerio";
12 version = "1.0.0-alpha";
13
14 src = fetchFromGitHub {
15 owner = "amatellanes";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "009h1mys175xdyznn5bl980vly40544s4ph1zcgqwg2i2ic93gvb";
19 };
20
21 propagatedBuildInputs = [
22 requests
23 ];
24
25 nativeCheckInputs = [
26 httpretty
27 pytestCheckHook
28 responses
29 ];
30
31 disabledTests = [
32 # tests require network access
33 "test_returns_historical_rates_for_symbols_passed_if_both"
34 "test_returns_historical_rates_for_symbols_passed_in_constructor"
35 "test_returns_historical_rates_for_symbols_passed_in_method"
36 "test_returns_latest_rates_for_symbols_passed_in_constructor"
37 "test_returns_latest_rates_for_symbols_passed_in_method"
38 "test_returns_latest_rates_for_symbols_passed_in_method_if_both"
39 ];
40
41 pythonImportsCheck = [ "fixerio" ];
42
43 meta = with lib; {
44 description = "Python client for Fixer.io";
45 longDescription = ''
46 Fixer.io is a free JSON API for current and historical foreign
47 exchange rates published by the European Central Bank.
48 '';
49 homepage = "https://github.com/amatellanes/fixerio";
50 license = with licenses; [ mit ];
51 maintainers = with maintainers; [ fab ];
52 };
53}