1{ lib
2, buildPythonPackage
3, fetchPypi
4, glibcLocales
5, pytest
6}:
7
8buildPythonPackage rec {
9 pname = "ephem";
10 version = "4.1";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "c076794a511a34b5b91871c1cf6374dbc323ec69fca3f50eb718f20b171259d6";
15 };
16
17 checkInputs = [
18 glibcLocales
19 pytest
20 ];
21
22 # JPLTest uses assets not distributed in package
23 checkPhase = ''
24 LC_ALL="en_US.UTF-8" pytest --pyargs ephem.tests -k "not JPLTest"
25 '';
26
27 pythonImportsCheck = [ "ephem" ];
28
29 meta = with lib; {
30 description = "Compute positions of the planets and stars";
31 homepage = "https://github.com/brandon-rhodes/pyephem";
32 license = licenses.mit;
33 maintainers = with maintainers; [ chrisrosset ];
34 };
35}