nixpkgs/pkgs/development/python-modules/xarray/default.nix

44 lines
978 B
Nix
Raw Normal View History

2017-04-18 11:50:55 +02:00
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, numpy
, pandas
, python
, fetchurl
2017-04-18 11:50:55 +02:00
}:
buildPythonPackage rec {
pname = "xarray";
2017-06-19 13:43:19 +02:00
version = "0.9.6";
2017-04-18 11:50:55 +02:00
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
2017-06-19 13:43:19 +02:00
sha256 = "f649a41d43b5a6c64bdcbd57e994932656b689f9593a86dd0be95778a2b47494";
2017-04-18 11:50:55 +02:00
};
# Temporary patch until next release (later than 0.9.6) to fix
# a broken test case.
patches = [
(fetchurl {
url = "https://github.com/pydata/xarray/commit/726c6a3638ecf95889c541d84e892a106c2f2f92.patch";
sha256 = "1i2hsj5v5qlvqfj48vyn9931yndsf4k4wrk3qpqpywh32s7r007b";
})
];
2017-04-18 11:50:55 +02:00
buildInputs = [ pytest ];
propagatedBuildInputs = [numpy pandas];
checkPhase = ''
py.test $out/${python.sitePackages}
'';
meta = {
description = "N-D labeled arrays and datasets in Python";
homepage = https://github.com/pydata/xarray;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fridh ];
};
}