From 171eb67367ede92ecaf28e1e15988b339edb32b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 06:39:04 +0000 Subject: [PATCH 1/2] deps: update nix lock file --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 6b4fc2b209..3844f312ad 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712192574, - "narHash": "sha256-LbbVOliJKTF4Zl2b9salumvdMXuQBr2kuKP5+ZwbYq4=", + "lastModified": 1712849433, + "narHash": "sha256-flQtf/ZPJgkLY/So3Fd+dGilw2DKIsiwgMEn7BbBHL0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f480f9d09e4b4cf87ee6151eba068197125714de", + "rev": "f173d0881eff3b21ebb29a2ef8bedbc106c86ea5", "type": "github" }, "original": { From 7be55ef3b8c6ab0035ba76dfd9ad654efb4a0419 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:18:25 +0200 Subject: [PATCH 2/2] package/azure-cli-with-extensions: remove, use upstream `withExtensions` as overlay Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- overlays/nixpkgs.nix | 7 ++++ .../azure-cli-with-extensions/package.nix | 32 ------------------- packages/scripts.nix | 6 ++-- 3 files changed, 10 insertions(+), 35 deletions(-) delete mode 100644 packages/by-name/azure-cli-with-extensions/package.nix diff --git a/overlays/nixpkgs.nix b/overlays/nixpkgs.nix index 316c69e44d..fbe0a93f34 100644 --- a/overlays/nixpkgs.nix +++ b/overlays/nixpkgs.nix @@ -14,4 +14,11 @@ final: prev: { hash = "sha256-N06oKyiexzjpaCZ8rFnH1f8YD5SSJQJUeEsgROkN9ak="; }; }); + + # Add the required extensions to the Azure CLI. + azure-cli = prev.azure-cli.override { + withExtensions = with final.azure-cli.extensions; [ + aks-preview + ]; + }; } diff --git a/packages/by-name/azure-cli-with-extensions/package.nix b/packages/by-name/azure-cli-with-extensions/package.nix deleted file mode 100644 index dc99dde3b0..0000000000 --- a/packages/by-name/azure-cli-with-extensions/package.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ fetchurl -, python3 -, azure-cli -, symlinkJoin -}: -let - aks-preview = python3.pkgs.buildPythonPackage rec { - pname = "aks-preview"; - version = "0.5.173"; - format = "wheel"; - src = fetchurl { - url = "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.173-py2.py3-none-any.whl"; - hash = "sha256-6BWX0CzL0oVrf9ljHjQU1jvmQiHXHGDcbhVIyVSH1u4="; - }; - postInstall = '' - ln -s $out/${python3.sitePackages} $out/${pname} - ''; - }; - - cliextensions = symlinkJoin { - name = "cliextensions"; - paths = [ aks-preview ]; - }; -in -azure-cli.overrideAttrs - (_oldAttrs: { - postFixup = '' - wrapProgram $out/bin/az \ - --set PYTHONPATH $PYTHONPATH \ - --set AZURE_EXTENSION_DIR ${cliextensions} - ''; - }) diff --git a/packages/scripts.nix b/packages/scripts.nix index 2c368f58ce..1bdf146271 100644 --- a/packages/scripts.nix +++ b/packages/scripts.nix @@ -5,13 +5,13 @@ with pkgs; { create-coco-aks = writeShellApplication { name = "create-coco-aks"; - runtimeInputs = [ azure-cli-with-extensions ]; + runtimeInputs = [ azure-cli ]; text = builtins.readFile ./create-coco-aks.sh; }; destroy-coco-aks = writeShellApplication { name = "destroy-coco-aks"; - runtimeInputs = [ azure-cli-with-extensions ]; + runtimeInputs = [ azure-cli ]; text = builtins.readFile ./destroy-coco-aks.sh; }; @@ -228,7 +228,7 @@ with pkgs; get-azure-sku-locations = writeShellApplication { name = "get-azure-sku-locations"; runtimeInputs = [ - azure-cli-with-extensions + azure-cli jq ]; text = ''