-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't eta-reduce with flakes: expected a function but got a thunk #4384
Labels
Comments
Probably a duplicate of #3966 ? |
Right, it's not allowed to have any evaluation to get the |
ambroisie
added a commit
to ambroisie/nix-config
that referenced
this issue
May 3, 2023
This ends up being more annoying than useful most of the time anyway... Make a note that we can't just eta-reduce the outputs, due to a nix limitation on flake outputs (see [1]). [1]: NixOS/nix#4384
ambroisie
added a commit
to ambroisie/nix-config
that referenced
this issue
May 3, 2023
This ends up being more annoying than useful most of the time anyway... Make a note that we can't just eta-reduce the outputs, due to a nix limitation on flake outputs (see [1]). [1]: NixOS/nix#4384
ambroisie
added a commit
to ambroisie/nix-config
that referenced
this issue
May 3, 2023
This ends up being more annoying than useful most of the time anyway... Make a note that we can't just eta-reduce the outputs, due to a nix limitation on flake outputs (see [1]). [1]: NixOS/nix#4384
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have a
flake.nix
file, in which I moved the outputs into their ownoutput.nix
file.If I try to eta-reduce the
outputs = args: import ./output.nix args;
call to simply beoutputs = import output.nix;
I get the following error:Steps To Reproduce
mkdir flake-bug && cd flake-bug
echo "{ inputs = { }; outputs = import ./outputs.nix; }" > flake.nix
echo "{ ... }: { }"> outputs.nix
nix flake check
Expected behavior
I expected the thunk to be forced and understood by nix to be a function.
nix-env --version
outputnix-env (Nix) 2.4pre20201201_5a6ddb3
The text was updated successfully, but these errors were encountered: