1{ stdenv, buildPythonPackage, fetchPypi, pytz, requests, pytest }:
2
3buildPythonPackage rec {
4 pname = "astral";
5 version = "1.6.1";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "ab0c08f2467d35fcaeb7bad15274743d3ac1ad18b5391f64a0058a9cd192d37d";
10 };
11
12 propagatedBuildInputs = [ pytz requests ];
13
14 checkInputs = [ pytest ];
15 checkPhase = ''
16 # https://github.com/sffjunkie/astral/pull/13
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}