I’m trying to write a shell that uses a flake. This works fine:
nix shell git+https://codeberg.org/mhwombat/hello-flake
So I expected this to work:
with (import <nixpkgs> {});
let
hello = (builtins.getFlake git+https://codeberg.org/mhwombat/hello-flake).packages.${builtins.currentSystem}.default;
in
mkShell {
buildInputs = [
hello
];
}
But I get the following error. What am I doing wrong?
$ with (import <nixpkgs> {});
let
hello = (builtins.getFlake git+https://codeberg.org/mhwombat/hello-flake).packages.${builtins.currentSystem}.default;
in
mkShell {
buildInputs = [
hello
];
}
Note: I also have a version of the flake https://codeberg.org/mhwombat/hello-flake-compat that uses the flake-compat library. I could use that instead, but if I understand things correctly, I shouldn’t need that to use builtins.getFlake
.