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

passthru attributes are evaluated like normal attributes #198

Open
jsoo1 opened this issue Apr 9, 2023 · 1 comment
Open

passthru attributes are evaluated like normal attributes #198

jsoo1 opened this issue Apr 9, 2023 · 1 comment

Comments

@jsoo1
Copy link
Contributor

jsoo1 commented Apr 9, 2023

I have a few build products that we make like this:

let res = nixos { ... }; in
res.system.overrideAttrs (o: { passthru = (o.passthru or { }) // res; })

Which results in errors like this with nix-eval-jobs

error: value is a set while a string was expected

       at /nix/store/.../nixos/default.nix:38:3:

           37|
           38|   system = eval.config.system.build.toplevel;
             |   ^
           39|

But nix-instantiate handles this fine.

Does nix-eval-jobs need to skip passthru attrs?

@Mic92
Copy link
Member

Mic92 commented Apr 12, 2023

Can you make this a complete example that evaluates?

╭─[/tmp/tmp.lit6ZL6FZb]
╰─ % nix-instantiate foo.nix
error: attribute 'system' missing

       at /tmp/tmp.lit6ZL6FZb/foo.nix:4:4:

            3| let res = nixos { };
            4| in res.system.overrideAttrs (o: { passthru = (o.passthru or { }) // res; })
             |    ^
            5|

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