nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, python3, fetchFromGitHub }:
2
3let
4 # csvs-to-sqlite is currently not compatible with Click 8. See the following
5 # https://github.com/simonw/csvs-to-sqlite/issues/80
6 #
7 # Workaround the issue by providing click 7 explicitly.
8 python = python3.override {
9 packageOverrides = self: super: {
10 # Use click 7
11 click = super.click.overridePythonAttrs (old: rec {
12 version = "7.1.2";
13 src = old.src.override {
14 inherit version;
15 hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
16 };
17 });
18 };
19 };
20in with python.pkgs; buildPythonApplication rec {
21 pname = "csvs-to-sqlite";
22 version = "1.2";
23 format = "setuptools";
24
25 disabled = !isPy3k;
26
27 src = fetchFromGitHub {
28 owner = "simonw";
29 repo = pname;
30 rev = version;
31 hash = "sha256-ZG7Yto8q9QNNJPB/LMwzucLfCGiqwBd3l0ePZs5jKV0";
32 };
33
34 propagatedBuildInputs = [
35 click
36 dateparser
37 pandas
38 py-lru-cache
39 six
40 ];
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 ];
45
46 meta = with lib; {
47 description = "Convert CSV files into a SQLite database";
48 homepage = "https://github.com/simonw/csvs-to-sqlite";
49 license = licenses.asl20;
50 maintainers = [ maintainers.costrouc ];
51 };
52
53}