diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2021-06-02 00:01:59 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2021-06-02 00:01:59 +0200 |
commit | 27ecd47c5b6a77443bc55819b303c75137e835cf (patch) | |
tree | 3313a4c8ae1dd0aa841f3d227d79ef941558de26 /pkgs/development/tools/database | |
parent | deaa70e29e09300cca0f2724e5d0d9c8770f085a (diff) | |
download | nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar.gz nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar.bz2 nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar.lz nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar.xz nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.tar.zst nixpkgs-27ecd47c5b6a77443bc55819b303c75137e835cf.zip |
sqlfluff: init at 0.6.0a2
Diffstat (limited to 'pkgs/development/tools/database')
-rw-r--r-- | pkgs/development/tools/database/sqlfluff/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/tools/database/sqlfluff/default.nix b/pkgs/development/tools/database/sqlfluff/default.nix new file mode 100644 index 00000000000..01f4941c8e4 --- /dev/null +++ b/pkgs/development/tools/database/sqlfluff/default.nix @@ -0,0 +1,65 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "sqlfluff"; + version = "0.6.0a2"; + disabled = python3.pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "13hzr0jialzi2nlvqwvff3w0h6jikqvcg0p2p4irwlisg4db8w7w"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + appdirs + cached-property + click + colorama + configparser + diff_cover + jinja2 + oyaml + pathspec + pytest + tblib + toml + ] ++ lib.optionals (pythonOlder "3.7") [ + dataclasses + ] ++ lib.optionals (pythonOlder "3.9") [ + typing-extensions + ]; + + checkInputs = with python3.pkgs; [ + hypothesis + pytestCheckHook + ]; + + disabledTestPaths = [ + # dbt is not available yet + "test/core/templaters/dbt_test.py" + # Don't run the plugin related tests + "test/core/plugin_test.py" + "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" + ]; + + pythonImportsCheck = [ "sqlfluff" ]; + + meta = with lib; { + description = "SQL linter and auto-formatter"; + homepage = "https://www.sqlfluff.com/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |