nixpkgs/pkgs/development/python-modules/astral/default.nix

28 lines
716 B
Nix
Raw Normal View History

2018-02-26 15:22:09 -08:00
{ stdenv, buildPythonPackage, fetchPypi, pytz, requests, pytest }:
2017-11-23 14:53:28 -08:00
buildPythonPackage rec {
pname = "astral";
2019-01-31 06:09:04 -08:00
version = "1.9.2";
2017-11-23 14:53:28 -08:00
src = fetchPypi {
inherit pname version;
2019-01-31 06:09:04 -08:00
sha256 = "179f72a086cee96487e60514bab81e821966953fc2e2f7091500d3d2c314e38b";
2017-11-23 14:53:28 -08:00
};
2018-02-26 15:22:09 -08:00
propagatedBuildInputs = [ pytz requests ];
2017-11-23 14:53:28 -08:00
checkInputs = [ pytest ];
checkPhase = ''
2019-01-29 06:47:00 -08:00
# https://github.com/sffjunkie/astral/pull/26
2018-02-26 15:22:09 -08:00
touch src/test/.api_key
py.test -m "not webtest"
2017-11-23 14:53:28 -08:00
'';
meta = with stdenv.lib; {
description = "Calculations for the position of the sun and the moon";
homepage = https://github.com/sffjunkie/astral/;
license = licenses.asl20;
maintainers = with maintainers; [ flokli ];
};
}