2021-09-14 14:34:34 +00:00
|
|
|
{ lib, python3, fetchFromGitHub }:
|
2019-05-07 12:49:05 +00:00
|
|
|
|
2021-09-14 14:34:34 +00:00
|
|
|
let
|
|
|
|
# csvs-to-sqlite is currently not compatible with Click 8. See the following
|
|
|
|
# https://github.com/simonw/csvs-to-sqlite/issues/80
|
|
|
|
#
|
|
|
|
# Workaround the issue by providing click 7 explicitly.
|
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
2022-01-16 06:34:26 +00:00
|
|
|
# Use click 7
|
2022-06-06 18:35:32 +00:00
|
|
|
click = super.click.overridePythonAttrs (old: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
|
|
|
|
};
|
|
|
|
});
|
2021-09-14 14:34:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in with python.pkgs; buildPythonApplication rec {
|
2019-05-07 12:49:05 +00:00
|
|
|
pname = "csvs-to-sqlite";
|
2020-12-07 13:33:31 +00:00
|
|
|
version = "1.2";
|
2019-09-17 14:25:09 +00:00
|
|
|
disabled = !isPy3k;
|
2019-05-07 12:49:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-12-07 13:33:31 +00:00
|
|
|
sha256 = "0p99cg76d3s7jxvigh5ad04dzhmr6g62qzzh4i6h7x9aiyvdhvk4";
|
2019-05-07 12:49:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
dateparser
|
|
|
|
pandas
|
|
|
|
py-lru-cache
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-02-15 22:04:15 +00:00
|
|
|
pytestCheckHook
|
2019-05-07 12:49:05 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Convert CSV files into a SQLite database";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/simonw/csvs-to-sqlite";
|
2019-05-07 12:49:05 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|