From 06e34737eb275abba8292dec72d86eaeba8d8144 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Jan 2026 08:30:45 +0100 Subject: [PATCH] sqlfluff: modernize --- pkgs/by-name/sq/sqlfluff/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/sq/sqlfluff/package.nix b/pkgs/by-name/sq/sqlfluff/package.nix index 011b3ea3455c..c0b18b15c760 100644 --- a/pkgs/by-name/sq/sqlfluff/package.nix +++ b/pkgs/by-name/sq/sqlfluff/package.nix @@ -5,7 +5,7 @@ versionCheckHook, }: -python3Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication (finalAttrs: { pname = "sqlfluff"; version = "4.0.0"; pyproject = true; @@ -13,15 +13,14 @@ python3Packages.buildPythonApplication rec { src = fetchFromGitHub { owner = "sqlfluff"; repo = "sqlfluff"; - tag = version; + tag = finalAttrs.version; hash = "sha256-hXiy3PGoBe6O9FaACN31Tss3xMBfiw4YuVLxbGi+/tA="; }; + pythonRelaxDeps = [ "click" ]; + build-system = with python3Packages; [ setuptools ]; - pythonRelaxDeps = [ - "click" - ]; dependencies = with python3Packages; [ appdirs cached-property @@ -47,6 +46,7 @@ python3Packages.buildPythonApplication rec { pytestCheckHook versionCheckHook ]; + versionCheckProgramArg = "--version"; disabledTestPaths = [ @@ -71,9 +71,9 @@ python3Packages.buildPythonApplication rec { meta = { description = "SQL linter and auto-formatter"; homepage = "https://www.sqlfluff.com/"; - changelog = "https://github.com/sqlfluff/sqlfluff/blob/${src.tag}/CHANGELOG.md"; - license = with lib.licenses; [ mit ]; + changelog = "https://github.com/sqlfluff/sqlfluff/blob/${finalAttrs.src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "sqlfluff"; }; -} +})