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>
This commit is contained in:
Paul Meyer 2024-07-08 15:24:57 +02:00
parent 1f75fe0eb6
commit 25ddee5f16
2 changed files with 10 additions and 4 deletions

View File

@ -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";

View File

@ -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 ];
};