2019-05-07 13:49:05 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2019-09-17 15:25:09 +01:00
|
|
|
, isPy3k
|
2019-05-07 13:49:05 +01:00
|
|
|
, pytestrunner
|
|
|
|
, click
|
|
|
|
, dateparser
|
|
|
|
, pandas
|
|
|
|
, py-lru-cache
|
|
|
|
, six
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "csvs-to-sqlite";
|
2020-08-10 06:12:22 +01:00
|
|
|
version = "1.1";
|
2019-09-17 15:25:09 +01:00
|
|
|
disabled = !isPy3k;
|
2019-05-07 13:49:05 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-08-10 06:12:22 +01:00
|
|
|
sha256 = "1xi9d8l1sf9vixzvqpz8lvhl6yqmz9x5659nvpsxinl317qzmc8m";
|
2019-05-07 13:49:05 +01:00
|
|
|
};
|
|
|
|
|
2020-02-14 16:38:11 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace pandas~=0.25.0 pandas
|
|
|
|
'';
|
|
|
|
|
2019-05-07 13:49:05 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
dateparser
|
|
|
|
pandas
|
|
|
|
py-lru-cache
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Convert CSV files into a SQLite database";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/simonw/csvs-to-sqlite";
|
2019-05-07 13:49:05 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|