Merge pull request #263637 from mdarocha/azure-cli-fix-build

azure-cli: fix build failure

authored by OTABI Tomoya and committed by GitHub 90e85bc7 3d0ecc2e

+17 -6
+2 -6
pkgs/tools/admin/azure-cli/default.nix
··· 1 1 { lib 2 - , stdenv 3 - , python3 4 - , fetchPypi 2 + , callPackage 5 3 , fetchFromGitHub 6 4 , installShellFiles 7 5 }: ··· 18 16 }; 19 17 20 18 # put packages that needs to be overridden in the py package scope 21 - py = import ./python-packages.nix { 22 - inherit stdenv src version python3 fetchPypi; 23 - }; 19 + py = callPackage ./python-packages.nix { inherit src version; }; 24 20 in 25 21 26 22 py.pkgs.toPythonApplication (py.pkgs.buildAzureCliPackage {
+15
pkgs/tools/admin/azure-cli/python-packages.nix
··· 1 1 { stdenv 2 2 , python3 3 3 , fetchPypi 4 + , fetchpatch 4 5 , src 5 6 , version 6 7 }: ··· 27 28 azure-cli-core = buildAzureCliPackage { 28 29 pname = "azure-cli-core"; 29 30 inherit version src; 31 + 32 + patches = [ 33 + (fetchpatch { 34 + name = "fix-python311.patch"; 35 + url = "https://github.com/Azure/azure-cli/commit/a5198b578b17de934e15b1c92e369e45323e9658.patch"; 36 + hash = "sha256-qbyKF6Vvtz8QwY78sG7ptTVcbM2IR+phntOKqsrWetE="; 37 + stripLen = 2; 38 + includes = [ 39 + "azure/cli/core/tests/test_command_registration.py" 40 + "azure/cli/core/tests/test_help.py" 41 + "azure/cli/core/tests/test_parser.py" 42 + ]; 43 + }) 44 + ]; 30 45 31 46 sourceRoot = "${src.name}/src/azure-cli-core"; 32 47