From 25ddee5f16d510cc4bf3ba79494b7a848429c033 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:24:57 +0200 Subject: [PATCH] azure-cli: pin python to python311 Fixes https://github.com/NixOS/nixpkgs/issues/325528 Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- pkgs/tools/admin/azure-cli/default.nix | 11 ++++++++--- pkgs/tools/admin/azure-cli/extensions-manual.nix | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/admin/azure-cli/default.nix b/pkgs/tools/admin/azure-cli/default.nix index 89bd83d23a1b..6c4a431403c0 100644 --- a/pkgs/tools/admin/azure-cli/default.nix +++ b/pkgs/tools/admin/azure-cli/default.nix @@ -5,7 +5,7 @@ , fetchurl , fetchFromGitHub , installShellFiles -, python3 +, python311 # Whether to include patches that enable placing certain behavior-defining # configuration files in the Nix store. @@ -28,8 +28,13 @@ let hash = "sha256-RmCZigDenbX8OoIZeY087ga2AP8yRckyG0qZnN9gg44="; }; + # Pin Python version to 3.11. + # See https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/53 + # and https://github.com/Azure/azure-cli/issues/27673 + python3 = python311; + # put packages that needs to be overridden in the py package scope - py = callPackage ./python-packages.nix { inherit src version; }; + py = callPackage ./python-packages.nix { inherit src version python3; }; # Builder for Azure CLI extensions. Extensions are Python wheels that # outside of nix would be fetched by the CLI itself from various sources. @@ -55,7 +60,7 @@ let extensions = callPackages ./extensions-generated.nix { inherit mkAzExtension; } - // callPackages ./extensions-manual.nix { inherit mkAzExtension; }; + // callPackages ./extensions-manual.nix { inherit mkAzExtension python3; python3Packages = python3.pkgs; }; extensionDir = stdenvNoCC.mkDerivation { name = "azure-cli-extensions"; diff --git a/pkgs/tools/admin/azure-cli/extensions-manual.nix b/pkgs/tools/admin/azure-cli/extensions-manual.nix index 66c2268bffbb..8d4a7f642b02 100644 --- a/pkgs/tools/admin/azure-cli/extensions-manual.nix +++ b/pkgs/tools/admin/azure-cli/extensions-manual.nix @@ -6,6 +6,7 @@ , mkAzExtension , mycli , python3Packages +, python3 }: { @@ -31,7 +32,7 @@ pymysql setproctitle ]) ++ [ - mycli + (mycli.override { inherit python3; }) ]; meta.maintainers = with lib.maintainers; [ obreitwi ]; };