devenv icon indicating copy to clipboard operation
devenv copied to clipboard

nixos-rebuild error: function 'anonymous lambda' called with unexpected argument 'nix'

Open ddogfoodd opened this issue 1 year ago • 4 comments

Describe the bug When trying to rebuild nixos with the latest nixos-unstable changes there is an error, which I assume might occur due to devenv 1.1 making it into nixos-unstable.

Here is the error message:

┏━ 1 Errors:
┃ error:
┃        … while calling the 'head' builtin
┃          at /nix/store/2pw5bsq1r80lcvvh2wp89m142nln1zpl-source/lib/attrsets.nix:1575:11:
┃          1574|         || pred here (elemAt values 1) (head values) then
┃          1575|           head values
┃              |           ^
┃          1576|         else
┃
┃        … while evaluating the attribute 'value'
┃          at /nix/store/2pw5bsq1r80lcvvh2wp89m142nln1zpl-source/lib/modules.nix:821:9:
┃           820|     in warnDeprecation opt //
┃           821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
┃              |         ^
┃           822|         inherit (res.defsFinal') highestPrio;
┃
┃        (stack trace truncated; use '--show-trace' to show the full trace)
┃
┃        error: function 'anonymous lambda' called with unexpected argument 'nix'
┃        at /nix/store/2pw5bsq1r80lcvvh2wp89m142nln1zpl-source/pkgs/by-name/de/devenv/package.nix:1:1:
┃             1| { lib
┃              | ^
┃             2| , stdenv
┃        Did you mean lib?
┣━━━
┗━ ∑ ⚠ Exited with 1 errors reported by nix at 15:15:50 after 13s

Version

Current version I have installed is 1.0.8 This error occurs when trying to update to 1.1

ddogfoodd avatar Sep 14 '24 13:09 ddogfoodd

In case this issue should be opened in the nixpkgs repo instead, let me know and please excuse me posting it here. Also let me know you cannot reproduce and I can provide further help via logs etc.

ddogfoodd avatar Sep 14 '24 13:09 ddogfoodd

@ddogfoodd I confirm, have the exact same issue. Maybe will use upstream for now.

heinwol avatar Sep 15 '24 00:09 heinwol

@ddogfoodd are you using Lix? If so, believe there's a conflict between this bit in their overlay and this nixpkgs PR that causes this issue -- the PR removed nix as an input to the devenv derivation, but the overlay still passes it.

I think the overlay is no longer necessary since the nix version is now explicit in the devenv package -- planning to open a PR to the Lix repo but haven't had a chance yet.

devusb avatar Sep 15 '24 04:09 devusb

Thanks @devusb

domenkozar avatar Sep 15 '24 11:09 domenkozar

https://git.lix.systems/lix-project/nixos-module/pulls/34 fix is in main, sounds like a release with it is still pending.

devusb avatar Sep 18 '24 11:09 devusb

Fixed as of lix 2.91.1-1

ddogfoodd avatar Oct 22 '24 14:10 ddogfoodd

Running on lix version 2.91.1, still getting that error message... Is there some other fix?

xaiyadev avatar Oct 29 '24 12:10 xaiyadev

@BreakingTV You have to use the lix version 2.91.1-1 For reference see: https://git.lix.systems/lix-project/lix/issues/528#issuecomment-6883

ddogfoodd avatar Oct 29 '24 12:10 ddogfoodd

Ohhh okay my bad, thx ^^

xaiyadev avatar Oct 29 '24 12:10 xaiyadev