summary refs log tree commit diff
path: root/pkgs/tools/admin/azure-cli/python-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/admin/azure-cli/python-packages.nix')
-rw-r--r--pkgs/tools/admin/azure-cli/python-packages.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/tools/admin/azure-cli/python-packages.nix b/pkgs/tools/admin/azure-cli/python-packages.nix
index d13dd282301..fa7d84e5117 100644
--- a/pkgs/tools/admin/azure-cli/python-packages.nix
+++ b/pkgs/tools/admin/azure-cli/python-packages.nix
@@ -1,6 +1,7 @@
 { stdenv
 , python3
 , fetchPypi
+, fetchpatch
 , src
 , version
 }:
@@ -28,6 +29,20 @@ let
         pname = "azure-cli-core";
         inherit version src;
 
+        patches = [
+          (fetchpatch {
+            name = "fix-python311.patch";
+            url = "https://github.com/Azure/azure-cli/commit/a5198b578b17de934e15b1c92e369e45323e9658.patch";
+            hash = "sha256-qbyKF6Vvtz8QwY78sG7ptTVcbM2IR+phntOKqsrWetE=";
+            stripLen = 2;
+            includes = [
+              "azure/cli/core/tests/test_command_registration.py"
+              "azure/cli/core/tests/test_help.py"
+              "azure/cli/core/tests/test_parser.py"
+            ];
+          })
+        ];
+
         sourceRoot = "${src.name}/src/azure-cli-core";
 
         propagatedBuildInputs = with self; [