2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sqlfluff";
|
2022-01-26 04:04:25 +00:00
|
|
|
version = "0.9.2";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-26 04:04:25 +00:00
|
|
|
hash = "sha256-BzO7S2sxZeklzIh1qRHJ4mGLsKLNpg8PuGGRVAkPlzc=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
appdirs
|
|
|
|
cached-property
|
2022-01-07 04:07:37 +00:00
|
|
|
chardet
|
2021-06-28 23:13:55 +00:00
|
|
|
click
|
|
|
|
colorama
|
|
|
|
configparser
|
2021-08-05 21:33:18 +00:00
|
|
|
diff-cover
|
2021-06-28 23:13:55 +00:00
|
|
|
jinja2
|
|
|
|
oyaml
|
|
|
|
pathspec
|
|
|
|
pytest
|
2022-01-07 04:07:37 +00:00
|
|
|
regex
|
2021-06-28 23:13:55 +00:00
|
|
|
tblib
|
|
|
|
toml
|
2021-12-06 16:07:01 +00:00
|
|
|
tqdm
|
2021-08-12 14:41:47 +00:00
|
|
|
typing-extensions
|
2021-06-28 23:13:55 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
2022-01-07 04:07:37 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
backports.cached-property
|
|
|
|
importlib_metadata
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't run the plugin related tests
|
|
|
|
"test/core/plugin_test.py"
|
2021-10-17 02:12:59 +00:00
|
|
|
"plugins/sqlfluff-templater-dbt"
|
2021-06-28 23:13:55 +00:00
|
|
|
"plugins/sqlfluff-plugin-example/test/rules/rule_test_cases_test.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# dbt is not available yet
|
|
|
|
"test__linter__skip_dbt_model_disabled"
|
|
|
|
"test_rules__test_helper_has_variable_introspection"
|
|
|
|
"test__rules__std_file_dbt"
|
|
|
|
];
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sqlfluff"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SQL linter and auto-formatter";
|
|
|
|
homepage = "https://www.sqlfluff.com/";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|