Skip to content
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

devshell broken on nixpkgs-unstable #399

Open
womfoo opened this issue Mar 20, 2025 · 1 comment
Open

devshell broken on nixpkgs-unstable #399

womfoo opened this issue Mar 20, 2025 · 1 comment

Comments

@womfoo
Copy link
Contributor

womfoo commented Mar 20, 2025

looks like a recent change in unstable NixOS/nixpkgs#386208 broke the devshell/nixago integration

nix build .#x86_64-linux.repo.shells.default
...
       … while evaluating derivation 'devshell'
         whose name attribute is located at /nix/store/wlhsnrq6g5avc7z21lfivqypaq5fy2wn-source/nix/mkNakedShell.nix:32:11

       … while evaluating attribute 'args' of derivation 'devshell'
         at /nix/store/wlhsnrq6g5avc7z21lfivqypaq5fy2wn-source/nix/mkNakedShell.nix:40:3:
           39|   # Bring in the dependencies on `nix-build`
           40|   args = [
             |   ^
           41|     "-ec"

       … while evaluating the option `devshell.startup.nixago-setup-hook.text':

       … while evaluating definitions from `<unknown-file>':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: cannot coerce a set to a string: { __functionArgs = «thunk»; __functor = «thunk»; }
korrat added a commit to korrat/nixago that referenced this issue Mar 25, 2025
In NixOS/nixpkgs#386208, function arguments are preserved in some
circumstances. This caused issues such as divnix/std#399. Ultimately,
it comes down to the `builtins.isFunction` check, which does not detect
functors.

With this patch, `hook.extra` is coerced to a function unconditionally.
If it is a constant, any arguments are ignored, so behaviour does not
change.
@korrat
Copy link

korrat commented Mar 25, 2025

I think I found the issue, which is not in std, but in nixago. The linked PR should resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants