mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
77 lines
1.6 KiB
Nix
77 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3,
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "sqlfluff";
|
|
version = "3.2.5";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sqlfluff";
|
|
repo = "sqlfluff";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-jYAzFqHuTpcgmnodt7vuNWTHRP3rd0B/3tp2Q04/N9o=";
|
|
};
|
|
|
|
build-system = with python3.pkgs; [ setuptools ];
|
|
|
|
dependencies =
|
|
with python3.pkgs;
|
|
[
|
|
appdirs
|
|
cached-property
|
|
chardet
|
|
click
|
|
colorama
|
|
configparser
|
|
diff-cover
|
|
jinja2
|
|
oyaml
|
|
pathspec
|
|
pytest
|
|
regex
|
|
tblib
|
|
toml
|
|
tqdm
|
|
typing-extensions
|
|
]
|
|
++ lib.optionals (pythonOlder "3.8") [
|
|
backports.cached-property
|
|
importlib_metadata
|
|
];
|
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
hypothesis
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# Don't run the plugin related tests
|
|
"plugins/sqlfluff-plugin-example/test/rules/rule_test_cases_test.py"
|
|
"plugins/sqlfluff-templater-dbt"
|
|
"test/core/plugin_test.py"
|
|
"test/diff_quality_plugin_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/";
|
|
changelog = "https://github.com/sqlfluff/sqlfluff/blob/${version}/CHANGELOG.md";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
mainProgram = "sqlfluff";
|
|
};
|
|
}
|