1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/ephem/default.nix
Frederik Rietdijk ced21f5e1a pythonPackages: remove name attribute`
The `buildPython*` function computes name from `pname` and `version`.
This change removes `name` attribute from all expressions in
`pkgs/development/python-modules`.

While at it, some other minor changes were made as well, such as
replacing `fetchurl` calls with `fetchPypi`.
2018-06-23 18:14:26 +02:00

32 lines
979 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, glibcLocales, pytest }:
buildPythonPackage rec {
pname = "ephem";
version = "3.7.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "7a4c82b1def2893e02aec0394f108d24adb17bd7b0ca6f4bc78eb7120c0212ac";
};
patchFlags = "-p0";
checkInputs = [ pytest glibcLocales ];
# JPLTest uses assets not distributed in package
checkPhase = ''
LC_ALL="en_US.UTF-8" py.test --pyargs ephem.tests -k "not JPLTest"
'';
# Unfortunately, the tests are broken for Python 3 in 3.7.6.0. They have been
# fixed in https://github.com/brandon-rhodes/pyephem/commit/c8633854e2d251a198b0f701d0528b508baa2411
# but there has not been a new release since then.
doCheck = !isPy3k;
meta = with stdenv.lib; {
description = "Compute positions of the planets and stars";
homepage = https://pypi.python.org/pypi/ephem/;
license = licenses.lgpl3;
maintainers = with maintainers; [ chrisrosset ];
};
}