2021-06-01 23:01:59 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sqlfluff";
|
2022-08-22 10:37:03 +01:00
|
|
|
version = "1.3.0";
|
2021-06-01 23:01:59 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-04-08 01:44:11 +01:00
|
|
|
rev = "refs/tags/${version}";
|
2022-08-22 10:37:03 +01:00
|
|
|
hash = "sha256-IPBq1jFUCJXG/XW1M1AoD3pfj2/jnGR1NLgbO5zcqFg=";
|
2021-06-01 23:01:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
appdirs
|
|
|
|
cached-property
|
2022-01-03 07:55:18 +00:00
|
|
|
chardet
|
2021-06-01 23:01:59 +01:00
|
|
|
click
|
|
|
|
colorama
|
|
|
|
configparser
|
2021-07-27 13:33:46 +01:00
|
|
|
diff-cover
|
2021-06-01 23:01:59 +01:00
|
|
|
jinja2
|
|
|
|
oyaml
|
|
|
|
pathspec
|
|
|
|
pytest
|
2022-01-03 07:55:18 +00:00
|
|
|
regex
|
2021-06-01 23:01:59 +01:00
|
|
|
tblib
|
|
|
|
toml
|
2021-11-08 07:30:27 +00:00
|
|
|
tqdm
|
2021-08-11 20:20:26 +01:00
|
|
|
typing-extensions
|
2021-06-01 23:01:59 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
2022-01-03 07:55:18 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
backports.cached-property
|
|
|
|
importlib_metadata
|
2021-06-01 23:01:59 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't run the plugin related tests
|
|
|
|
"test/core/plugin_test.py"
|
2021-10-16 21:28:39 +01:00
|
|
|
"plugins/sqlfluff-templater-dbt"
|
2021-06-01 23:01:59 +01: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-03 07:55:18 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sqlfluff"
|
|
|
|
];
|
2021-06-01 23:01:59 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "SQL linter and auto-formatter";
|
|
|
|
homepage = "https://www.sqlfluff.com/";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|