summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-09-09 11:43:43 +0300
committerJon <jonringer@users.noreply.github.com>2020-09-20 08:29:18 -0700
commit8bf99f67876a83a789cd4f97bc9ec2021ac264de (patch)
tree6313b243dd64951c5b1d72766fec46bd660c8d6f /pkgs/tools/text
parenteb9393a4db3b1ef2c372ff8e70629beef1abc159 (diff)
csvkit: fix tests
Remove unneeded glibcLocales. Remove overrided agate-sql and agate-dbf, as these overrides are not needed. Use pytestCheckHook instead of overriding checkPhase. Add an upstream patch that fixes tests.
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/csvkit/default.nix34
1 files changed, 12 insertions, 22 deletions
diff --git a/pkgs/tools/text/csvkit/default.nix b/pkgs/tools/text/csvkit/default.nix
index b79011bcff69..9e02265e2dc0 100644
--- a/pkgs/tools/text/csvkit/default.nix
+++ b/pkgs/tools/text/csvkit/default.nix
@@ -1,4 +1,4 @@
-{ lib, python3, glibcLocales }:
+{ lib, fetchpatch, python3 }:
python3.pkgs.buildPythonApplication rec {
pname = "csvkit";
@@ -9,36 +9,26 @@ python3.pkgs.buildPythonApplication rec {
sha256 = "1ffmbzk4rxnl1yhqfl58v7kvl5m9cbvjm8v7xp4mvr00sgs91lvv";
};
+ patches = [
+ # Fixes a failing dbf related test. Won't be needed on 1.0.6 or later.
+ (fetchpatch{
+ url = "https://github.com/wireservice/csvkit/commit/5f22e664121b13d9ff005a9206873a8f97431dca.patch";
+ sha256 = "1kg00z65x7l6dnm5nfsr5krs8m7mv23hhb1inkaqf5m5fpkpnvv7";
+ })
+ ];
+
propagatedBuildInputs = with python3.pkgs; [
agate
agate-excel
- # dbf test fail with agate-dbf-0.2.2
- (agate-dbf.overridePythonAttrs(old: rec {
- version = "0.2.1";
- src = python3.pkgs.fetchPypi {
- inherit (old) pname;
- inherit version;
- sha256 = "0brprva3vjypb5r9lk6zy10jazp681rxsqxzhz2lr869ir4krj80";
- };}))
- # sql test fail with agate-sql-0.5.4
- (agate-sql.overridePythonAttrs(old: rec {
- version = "0.5.3";
- src = python3.pkgs.fetchPypi {
- inherit (old) pname;
- inherit version;
- sha256 = "1d6rbahmdix7xi7ma2v86fpk5yi32q5dba5vama35w5mmn2pnyw7";
- };}))
+ agate-dbf
+ agate-sql
six
];
checkInputs = with python3.pkgs; [
- glibcLocales nose
+ nose pytestCheckHook
];
- 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 ];