summary refs log tree commit diff
path: root/pkgs/tools/admin/mycli
diff options
context:
space:
mode:
authorJohannes <johannes@js-webcoding.de>2020-12-09 06:00:55 +0100
committerGitHub <noreply@github.com>2020-12-09 06:00:55 +0100
commit40a7c98c1c56ff646cc03e938d980423483b2641 (patch)
treebdd3785f250c00f0dc882a43eba26d0bee2ddfb6 /pkgs/tools/admin/mycli
parent872cb2fc23a2a4775a4a0ba5a201932766bf87ea (diff)
downloadnixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar.gz
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar.bz2
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar.lz
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar.xz
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.tar.zst
nixpkgs-40a7c98c1c56ff646cc03e938d980423483b2641.zip
mycli: fix build with sqlparse 0.4.x (#106334)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/admin/mycli')
-rw-r--r--pkgs/tools/admin/mycli/default.nix21
1 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/tools/admin/mycli/default.nix b/pkgs/tools/admin/mycli/default.nix
index 4745d065be9..01b82dde4d5 100644
--- a/pkgs/tools/admin/mycli/default.nix
+++ b/pkgs/tools/admin/mycli/default.nix
@@ -1,6 +1,7 @@
 { lib
 , python3
 , glibcLocales
+, fetchpatch
 }:
 
 with python3.pkgs;
@@ -28,7 +29,21 @@ buildPythonApplication rec {
       --ignore=mycli/packages/paramiko_stub/__init__.py
   '';
 
-  meta = {
+  patches = [
+    # TODO: remove with next release (v1.22.3 or v1.23)
+    (fetchpatch {
+      url = "https://github.com/dbcli/mycli/commit/17f093d7b70ab2d9f3c6eababa041bf76f029aac.patch";
+      sha256 = "sha256-VwfbtzUtElV+ErH+NJb+3pRtSaF0yVK8gEWCvlzZNHI=";
+      excludes = [ "changelog.md" "mycli/AUTHORS" ];
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "sqlparse>=0.3.0,<0.4.0" "sqlparse"
+  '';
+
+  meta = with lib; {
     inherit version;
     description = "Command-line interface for MySQL";
     longDescription = ''
@@ -36,7 +51,7 @@ buildPythonApplication rec {
       syntax highlighting.
     '';
     homepage = "http://mycli.net";
-    license = lib.licenses.bsd3;
-    maintainers = [ lib.maintainers.jojosch ];
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ jojosch ];
   };
 }