1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy3k
5, pytestrunner
6, click
7, dateparser
8, pandas
9, py-lru-cache
10, six
11, pytest
12}:
13
14buildPythonPackage rec {
15 pname = "csvs-to-sqlite";
16 version = "1.1";
17 disabled = !isPy3k;
18
19 src = fetchFromGitHub {
20 owner = "simonw";
21 repo = pname;
22 rev = version;
23 sha256 = "1xi9d8l1sf9vixzvqpz8lvhl6yqmz9x5659nvpsxinl317qzmc8m";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py \
28 --replace pandas~=0.25.0 pandas
29 '';
30
31 propagatedBuildInputs = [
32 click
33 dateparser
34 pandas
35 py-lru-cache
36 six
37 ];
38
39 checkInputs = [
40 pytest
41 ];
42
43 checkPhase = ''
44 pytest
45 '';
46
47 meta = with lib; {
48 description = "Convert CSV files into a SQLite database";
49 homepage = "https://github.com/simonw/csvs-to-sqlite";
50 license = licenses.asl20;
51 maintainers = [ maintainers.costrouc ];
52 };
53
54}