2021-01-09 10:05:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
|
|
|
, httpretty
|
2021-02-05 17:12:51 +00:00
|
|
|
, responses
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fixerio";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "1.0.0-alpha";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amatellanes";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "009h1mys175xdyznn5bl980vly40544s4ph1zcgqwg2i2ic93gvb";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
httpretty
|
|
|
|
pytestCheckHook
|
2021-02-05 17:12:51 +00:00
|
|
|
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"
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|