hello, anyone know why derivations in flake templates are not evaluated?
Consider the following code:
{
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
templatePackage = pkgs.stdenv.mkDerivation {
name = "foo-template-package";
src = ./.;
installPhase = ''
mkdir -p $out
echo yo > $out/foo
'';
};
in
{
templates = {
foo = {
path = "${templatePackage}";
};
};
};
}
Calling nix flake init -t ".#foo"
gives me the following error:
error: opening directory '/nix/store/<some-hash>-foo-template-package': No such file or directory