Quick heads up: I'm pretty brand new to Nix, so apologies if I've missed something or if I go about this issue the wrong way. Let me know.
Describe the bug
Installing the current release (24.05) or unstable (at time of writing) package of azure-functions-core-tools (package version 4.0.5455) leaves some functionality unusable due to the templates/ directory of the release missing from the nix cache.
I've tried to init a new .NET function and the tools cannot complete due to the missing templates:
should successfully complete and create a new Function App.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I don't know if this affects anything other than dotnet - not familiar enough with the inner working of the azure functions tools to know what else uses that templates directory.
I have confirmed it works with the 23.11 version for azure-functions-core-tools: Here's a Flake that works for me:
Example Flake with workaround
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
func-nixpkgs.url = "github:NixOS/nixpkgs?ref=release-23.11";
};
outputs = {
self,
nixpkgs,
func-nixpkgs,
...
} @ inputs: let
forEachSystem = nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-linux"];
in {
devShells =
forEachSystem
(system: let
pkgs = nixpkgs.legacyPackages.${system};
func-pkgs = func-nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
name = "my-project-shell";
packages = with pkgs; [
(with dotnetCorePackages;
combinePackages [
sdk_8_0
runtime_6_0
aspnetcore_6_0
])
azure-cli
func-pkgs.azure-functions-core-tools
];
};
});
};
}
```
Since the 23.11 version works, I have noticed that the package scripts differ quite a lot between 23.11 and 24.05.
I'm not deep enough into Nix yet to know if the difference matters, but clearly they are approaching the packaging a little differently.
Notify maintainers
@mdarocha @Detegr are package maintainers
@momeemt has opened #310237 to upgrade the tools but it still uses the 24.05 package approach; would be interested to know if that has the same issue.
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
Quick heads up: I'm pretty brand new to Nix, so apologies if I've missed something or if I go about this issue the wrong way. Let me know.
Describe the bug
Installing the current release (
24.05
) orunstable
(at time of writing) package ofazure-functions-core-tools
(package version4.0.5455
) leaves some functionality unusable due to thetemplates/
directory of the release missing from the nix cache.I've tried to
init
a new .NET function and the tools cannot complete due to the missing templates:Sure enough, if I
cd
to that location, the wholetemplates/
directory is not present.Here is the GitHub release the
24.05
package should presumably be pulling (based on the package version): https://github.com/Azure/azure-functions-core-tools/releases/tag/4.0.5455Downloading an asset from the above and unzipping it does contain the
templates/
directory as expected.Switching to
23.11
and usingazure-functions-core-tools
version4.0.5348
works correctly.I've observed this using Flakes and
nix develop
/ direnv on both Fedora 40 with Nix and macOS usingnix-darwin
.Steps To Reproduce
Steps to reproduce the behavior:
unstable
or24.05
Define combined dotnet packages per these docs:
nix develop
func init FunctionApp --worker-runtime dotnet-isolated --target-framework net8.0
Example Flake to reproduce
```nix { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = { self, nixpkgs, ... } @ inputs: let forEachSystem = nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-linux"]; in { devShells = forEachSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.mkShell { name = "my-project-shell"; packages = with pkgs; [ (with dotnetCorePackages; combinePackages [ sdk_8_0 runtime_6_0 aspnetcore_6_0 ]) azure-cli azure-functions-core-tools ]; }; }); }; } ```Expected behavior
func init FunctionApp --worker-runtime dotnet-isolated --target-framework net8.0
should successfully complete and create a new Function App.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I don't know if this affects anything other than dotnet - not familiar enough with the inner working of the azure functions tools to know what else uses that templates directory.
I have confirmed it works with the
23.11
version forazure-functions-core-tools
: Here's a Flake that works for me:Example Flake with workaround
```nix { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; func-nixpkgs.url = "github:NixOS/nixpkgs?ref=release-23.11"; }; outputs = { self, nixpkgs, func-nixpkgs, ... } @ inputs: let forEachSystem = nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-linux"]; in { devShells = forEachSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; func-pkgs = func-nixpkgs.legacyPackages.${system}; in { default = pkgs.mkShell { name = "my-project-shell"; packages = with pkgs; [ (with dotnetCorePackages; combinePackages [ sdk_8_0 runtime_6_0 aspnetcore_6_0 ]) azure-cli func-pkgs.azure-functions-core-tools ]; }; }); }; } ```Since the
23.11
version works, I have noticed that the package scripts differ quite a lot between23.11
and24.05
.I'm not deep enough into Nix yet to know if the difference matters, but clearly they are approaching the packaging a little differently.
Notify maintainers
@mdarocha @Detegr are package maintainers @momeemt has opened #310237 to upgrade the tools but it still uses the
24.05
package approach; would be interested to know if that has the same issue.Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.