diff --git a/pkgs/development/python-modules/agate-excel/default.nix b/pkgs/development/python-modules/agate-excel/default.nix index 24287039abd..4636f51d4bd 100644 --- a/pkgs/development/python-modules/agate-excel/default.nix +++ b/pkgs/development/python-modules/agate-excel/default.nix @@ -1,21 +1,28 @@ -{ stdenv, fetchPypi, buildPythonPackage, agate, openpyxl, xlrd }: +{ lib, fetchPypi, fetchpatch, buildPythonPackage +, agate, openpyxl, xlrd, nose +}: buildPythonPackage rec { - pname = "agate-excel"; - version = "0.2.2"; + pname = "agate-excel"; + version = "0.2.3"; - src = fetchPypi { - inherit pname version; - sha256 = "8923f71ee2b5b7b21e52fb314a769b28fb902f647534f5cbbb41991d8710f4c7"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "8f255ef2c87c436b7132049e1dd86c8e08bf82d8c773aea86f3069b461a17d52"; + }; - propagatedBuildInputs = [ agate openpyxl xlrd ]; + propagatedBuildInputs = [ agate openpyxl xlrd ]; - meta = with stdenv.lib; { - description = "Adds read support for excel files to agate"; - homepage = "https://github.com/wireservice/agate-excel"; - license = licenses.mit; - maintainers = with maintainers; [ vrthra ]; - }; + checkInputs = [ nose ]; + checkPhase = '' + nosetests + ''; + + meta = with lib; { + description = "Adds read support for excel files to agate"; + homepage = https://github.com/wireservice/agate-excel; + license = licenses.mit; + maintainers = with maintainers; [ vrthra ]; + }; } diff --git a/pkgs/development/python-modules/csvkit/default.nix b/pkgs/development/python-modules/csvkit/default.nix deleted file mode 100644 index 48f932086cc..00000000000 --- a/pkgs/development/python-modules/csvkit/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib, fetchPypi, buildPythonPackage, isPy3k -, agate, agate-excel, agate-dbf, agate-sql, six -, ordereddict, simplejson -, glibcLocales, nose, mock, unittest2 -}: - -buildPythonPackage rec { - pname = "csvkit"; - version = "1.0.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c"; - }; - - propagatedBuildInputs = [ - agate agate-excel agate-dbf agate-sql six - ] ++ lib.optionals (!isPy3k) [ - ordereddict simplejson - ]; - - checkInputs = [ - glibcLocales nose - ] ++ lib.optionals (!isPy3k) [ - mock unittest2 - ]; - - 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; - }; -} diff --git a/pkgs/tools/text/csvkit/default.nix b/pkgs/tools/text/csvkit/default.nix new file mode 100644 index 00000000000..1ff9cee241c --- /dev/null +++ b/pkgs/tools/text/csvkit/default.nix @@ -0,0 +1,30 @@ +{ lib, python3, glibcLocales }: + +python3.pkgs.buildPythonApplication rec { + pname = "csvkit"; + version = "1.0.3"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + agate agate-excel agate-dbf agate-sql six + ]; + + checkInputs = with python3.pkgs; [ + glibcLocales nose + ]; + + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests -e test_csvsql + ''; + + meta = with lib; { + description = "A suite of command-line tools for converting to and working with CSV"; + maintainers = with maintainers; [ vrthra ]; + license = licenses.mit; + homepage = https://github.com/wireservice/csvkit; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0fd55254687..523fff75f04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1256,6 +1256,8 @@ in crudini = callPackage ../tools/misc/crudini { }; + csvkit = callPackage ../tools/text/csvkit { }; + cucumber = callPackage ../development/tools/cucumber {}; daemontools = callPackage ../tools/admin/daemontools { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e2b9c35b532..90c97e1548e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1195,8 +1195,6 @@ in { csscompressor = callPackage ../development/python-modules/csscompressor {}; - csvkit = callPackage ../development/python-modules/csvkit { }; - cufflinks = callPackage ../development/python-modules/cufflinks { }; cupy = callPackage ../development/python-modules/cupy {