File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
pkgs/by-name/az/azure-cli Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 5454 {
5555 format = "wheel" ;
5656 src = fetchurl { inherit url hash ; } ;
57+ passthru = {
58+ updateScript = extensionUpdateScript { inherit pname ; } ;
59+ } // args . passthru or { } ;
5760 meta = {
5861 inherit description ;
5962 inherit ( azure-cli . meta ) platforms maintainers ;
6770 "url"
6871 "hash"
6972 "description"
73+ "passthru"
7074 "meta"
7175 ] )
7276 ) ;
77+ # Update script for azure cli extensions. Currently only works for manual extensions.
78+ extensionUpdateScript =
79+ { pname } :
80+ [
81+ "${ lib . getExe azure-cli . extensions-tool } "
82+ "--cli-version"
83+ "${ azure-cli . version } "
84+ "--extension"
85+ "${ pname } "
86+ ] ;
7387
74- extensions-generated = lib . mapAttrs ( name : ext : mkAzExtension ext ) (
75- builtins . fromJSON ( builtins . readFile ./extensions-generated.json )
76- ) ;
88+ extensions-generated = lib . mapAttrs (
89+ name : ext : mkAzExtension ( ext // { passthru . updateScript = [ ] ; } )
90+ ) ( builtins . fromJSON ( builtins . readFile ./extensions-generated.json ) ) ;
7791 extensions-manual = callPackages ./extensions-manual.nix {
7892 inherit mkAzExtension ;
7993 python3Packages = python3 . pkgs ;
You can’t perform that action at this time.
0 commit comments