1{ stdenv, buildPythonPackage, fetchPypi, pytz, requests, pytest }:
2
3buildPythonPackage rec {
4 pname = "astral";
5 version = "1.10.1";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1";
10 };
11
12 propagatedBuildInputs = [ pytz requests ];
13
14 checkInputs = [ pytest ];
15 checkPhase = ''
16 # https://github.com/sffjunkie/astral/pull/26
17 touch src/test/.api_key
18 py.test -m "not webtest"
19 '';
20
21 meta = with stdenv.lib; {
22 description = "Calculations for the position of the sun and the moon";
23 homepage = https://github.com/sffjunkie/astral/;
24 license = licenses.asl20;
25 maintainers = with maintainers; [ flokli ];
26 };
27}