about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sqlparse/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/sqlparse/default.nix')
-rw-r--r--pkgs/development/python-modules/sqlparse/default.nix48
1 files changed, 28 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/sqlparse/default.nix b/pkgs/development/python-modules/sqlparse/default.nix
index c0afa5eeb7c1c..69c91cf65c0cf 100644
--- a/pkgs/development/python-modules/sqlparse/default.nix
+++ b/pkgs/development/python-modules/sqlparse/default.nix
@@ -1,32 +1,34 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, flit-core
-, installShellFiles
-, pytestCheckHook
-, isPy3k
-
-# for passthru.tests
-, django
-, django_4
-, django-silk
-, pgadmin4
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  hatchling,
+  installShellFiles,
+  pytestCheckHook,
+  pythonOlder,
+
+  # for passthru.tests
+  django,
+  django_4,
+  django-silk,
+  pgadmin4,
 }:
 
 buildPythonPackage rec {
   pname = "sqlparse";
-  version = "0.4.4";
+  version = "0.5.0";
+  pyproject = true;
 
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-1EYYPoS4NJ+jBh8P5/BsqUumW0JpRv/r5uPoKVMyQgw=";
+    hash = "sha256-cU0KSTLAWdFhifWO9UEewih6Q2DxfN0O3S0J1MUIfJM=";
   };
 
-  format = "pyproject";
+  build-system = [ hatchling ];
 
-  nativeBuildInputs = [ flit-core installShellFiles ];
+  nativeBuildInputs = [ installShellFiles ];
 
   nativeCheckInputs = [ pytestCheckHook ];
 
@@ -35,16 +37,22 @@ buildPythonPackage rec {
   '';
 
   passthru.tests = {
-    inherit django django_4 django-silk pgadmin4;
+    inherit
+      django
+      django_4
+      django-silk
+      pgadmin4
+      ;
   };
 
   meta = with lib; {
     description = "Non-validating SQL parser for Python";
-    mainProgram = "sqlformat";
     longDescription = ''
       Provides support for parsing, splitting and formatting SQL statements.
     '';
     homepage = "https://github.com/andialbrecht/sqlparse";
+    changelog = "https://github.com/andialbrecht/sqlparse/blob/${version}/CHANGELOG";
     license = licenses.bsd3;
+    mainProgram = "sqlformat";
   };
 }