azure-cli: fix azure-cli-core build

Apply patch to fix tests broken on python311
This commit is contained in:
mdarocha 2023-10-26 20:18:30 +02:00
parent 4d6d43f444
commit 08a740252d
2 changed files with 17 additions and 6 deletions

View file

@ -1,7 +1,5 @@
{ lib { lib
, stdenv , callPackage
, python3
, fetchPypi
, fetchFromGitHub , fetchFromGitHub
, installShellFiles , installShellFiles
}: }:
@ -18,9 +16,7 @@ let
}; };
# put packages that needs to be overridden in the py package scope # put packages that needs to be overridden in the py package scope
py = import ./python-packages.nix { py = callPackage ./python-packages.nix { inherit src version; };
inherit stdenv src version python3 fetchPypi;
};
in in
py.pkgs.toPythonApplication (py.pkgs.buildAzureCliPackage { py.pkgs.toPythonApplication (py.pkgs.buildAzureCliPackage {

View file

@ -1,6 +1,7 @@
{ stdenv { stdenv
, python3 , python3
, fetchPypi , fetchPypi
, fetchpatch
, src , src
, version , version
}: }:
@ -28,6 +29,20 @@ let
pname = "azure-cli-core"; pname = "azure-cli-core";
inherit version src; 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"; sourceRoot = "${src.name}/src/azure-cli-core";
propagatedBuildInputs = with self; [ propagatedBuildInputs = with self; [