2018-02-27 00:22:09 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pytz, requests, pytest }:
|
2017-11-23 23:53:28 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astral";
|
2018-02-26 18:44:32 +01:00
|
|
|
version = "1.6";
|
2017-11-23 23:53:28 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-26 18:44:32 +01:00
|
|
|
sha256 = "874b397ddbf0a4c1d8d644b21c2481e8a96b61343f820ad52d8a322d61a15083";
|
2017-11-23 23:53:28 +01:00
|
|
|
};
|
|
|
|
|
2018-02-27 00:22:09 +01:00
|
|
|
propagatedBuildInputs = [ pytz requests ];
|
2017-11-23 23:53:28 +01:00
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
2018-02-27 00:22:09 +01:00
|
|
|
# https://github.com/sffjunkie/astral/pull/13
|
|
|
|
touch src/test/.api_key
|
|
|
|
py.test -m "not webtest"
|
2017-11-23 23:53:28 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|