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

39 lines
961 B
Nix
Raw Normal View History

2018-03-01 19:54:05 +00:00
{ lib, fetchPypi, buildPythonPackage, isPy3k
, agate, agate-excel, agate-dbf, agate-sql, six
, argparse, ordereddict, simplejson
, glibcLocales, nose, mock, unittest2
}:
2017-05-03 04:18:57 +00:00
buildPythonPackage rec {
2018-03-01 19:54:05 +00:00
pname = "csvkit";
2018-04-04 18:05:18 +00:00
version = "1.0.3";
2017-05-03 04:18:57 +00:00
2018-03-01 19:54:05 +00:00
src = fetchPypi {
inherit pname version;
2018-04-04 18:05:18 +00:00
sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c";
2018-03-01 19:54:05 +00:00
};
2017-05-03 04:18:57 +00:00
2018-03-01 19:54:05 +00:00
propagatedBuildInputs = [
agate agate-excel agate-dbf agate-sql six
] ++ lib.optionals (!isPy3k) [
argparse ordereddict simplejson
];
2017-05-03 04:18:57 +00:00
2018-03-01 19:54:05 +00:00
checkInputs = [
glibcLocales nose
] ++ lib.optionals (!isPy3k) [
mock unittest2
];
2017-05-03 04:18:57 +00:00
2018-03-01 19:54:05 +00:00
checkPhase = ''
LC_ALL="en_US.UTF-8" nosetests -e test_csvsql
'';
meta = with lib; {
description = "A library of utilities for working with CSV, the king of tabular file formats";
maintainers = with maintainers; [ vrthra ];
license = with licenses; [ mit ];
homepage = https://github.com/wireservice/csvkit;
};
2017-05-03 04:18:57 +00:00
}