2021-09-18 10:52:07 +00:00
|
|
|
{ lib, python3, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +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-19 23:45:15 +00:00
|
|
|
# Use click 7
|
2022-06-16 17:23:12 +00:00
|
|
|
click = super.click.overridePythonAttrs (old: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
});
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in with python.pkgs; buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "csvs-to-sqlite";
|
2020-12-09 12:39:15 +00:00
|
|
|
version = "1.2";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "simonw";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ZG7Yto8q9QNNJPB/LMwzucLfCGiqwBd3l0ePZs5jKV0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
dateparser
|
|
|
|
pandas
|
|
|
|
py-lru-cache
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-17 17:02:09 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|