aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/csvs-to-sqlite/default.nix
blob: 19d0fa4f7bbc81030c8fab68795a1fe8144ccaa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytestrunner
, click
, dateparser
, pandas
, py-lru-cache
, six
, pytest
}:

buildPythonPackage rec {
  pname = "csvs-to-sqlite";
  version = "1.1";
  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "simonw";
    repo = pname;
    rev = version;
    sha256 = "1xi9d8l1sf9vixzvqpz8lvhl6yqmz9x5659nvpsxinl317qzmc8m";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace pandas~=0.25.0 pandas
  '';

  propagatedBuildInputs = [
    click
    dateparser
    pandas
    py-lru-cache
    six
  ];

  checkInputs = [
    pytest
  ];

  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    description = "Convert CSV files into a SQLite database";
    homepage = "https://github.com/simonw/csvs-to-sqlite";
    license = licenses.asl20;
    maintainers = [ maintainers.costrouc ];
  };

}