Merge pull request #306986 from katexochen/azure-cli/manual-exts

azure-cli: allow manual packaging of extensions with dependencies
This commit is contained in:
Paul Meyer 2024-04-29 08:50:06 +02:00 committed by GitHub
commit 3a039abc62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 4 deletions

View File

@ -39,8 +39,8 @@ let
, url
, sha256
, description
}: python3.pkgs.buildPythonPackage {
inherit pname version;
, ...
}@args: python3.pkgs.buildPythonPackage ({
format = "wheel";
src = fetchurl { inherit url sha256; };
meta = with lib; {
@ -51,9 +51,11 @@ let
license = lib.licenses.mit;
sourceProvenance = [ sourceTypes.fromSource ];
};
};
} // (removeAttrs args [ "url" "sha256" "description" ]));
extensions = callPackages ./extensions-generated.nix { inherit mkAzExtension; };
extensions =
callPackages ./extensions-generated.nix { inherit mkAzExtension; }
// callPackages ./extensions-manual.nix { inherit mkAzExtension; };
extensionDir = stdenvNoCC.mkDerivation {
name = "azure-cli-extensions";

View File

@ -0,0 +1,16 @@
{ mkAzExtension
, python3Packages
}:
{
azure-devops = mkAzExtension rec {
pname = "azure-devops";
version = "1.0.0";
url = "https://github.com/Azure/azure-devops-cli-extension/releases/download/20240206.1/azure_devops-${version}-py2.py3-none-any.whl";
sha256 = "658a2854d8c80f874f9382d421fa45abf6a38d00334737dda006f8dec64cf70a";
description = "Tools for managing Azure DevOps";
propagatedBuildInputs = with python3Packages; [
distro
];
};
}