Closed RaitoBezarius closed 2 years ago
Good day to you.
A note to be obvious: nix-shell
is the execution of the upstream nix
& it loads default.nix
configuration. CI tests it on default settings at every PR & runs everyday master
branch check.
I just now checked additionally in Nix v. 2.3.0
& latest one - 2.3.15
& they nix-shell
the configuration fine.
Upstream Nix ... lets say it has some hardcode & side effects, and it very well may be it on your setup. Because of the team & merging difficulties in the Nix to fix such things, that directly drove me here to maintain HNix
.
It may be something particularly special with your way of Nix configuration, locale/Nix version/way of nix configuration, as we both know Nix configuration is a quite complex beast.
If you would find the particular case - our team is open to merge patches & you always can reformulate/update the current report, add environment information, or open new reports whenever you would see fit.
If you know Haskell, I am open and happy to merge fixes to the code, code style in HNix is a bit special one, & the project has an exceptionally clean & concise codebase, & I myself accept any code styles.
There is a lot of ways to configure Nix loadout, so it is hard to guess the configuration you getting this exception under. If something - you also free to update default.nix
configuration and send the patch, if it would be an addition/improvement to the general case & internationalization - would be happy to merge an improvement.
Well, having no information provided - does not help.
It is upstream shenanigans:
https://github.com/NixOS/nix/issues/4003
Inheritance was designed pretty horribly in Nix:
https://github.com/haskell-nix/hnix/issues/762 - I specifically created this thread because Nix inheritance is a mess & hoped we would figure-out how to import what we want/need through it.
As we see from 4003
- Nixpkgs was using a Nix bug to overcome this.
I use Nix for 5 years & work on HNix & still do not understand all cases & details of the inheritance syntax. The main language design error there was - { <args> }
- loads args normally, but passing args through elipsis (...
), { ... }
- suddenly adds set name prefix to them, so set imports args differently both with prefix & without and dealing with that is laid on the user.
Additionally - the interfaces (settings) can not be propagated from shell.nix
into default.nix
, because Nix loads default.nix
before shell.nix
, and then shell.nix
actually needs to override the default.nix
settings.
Imagine if .cabal
config settings of upstream were required to be duplicated by downstream explicitly & HNix would be required to maintain the duplicates & their path through of all settings of all of the dependencies into dependencies. This is how interfaces are required to be passed in Nix.
@Anton-Latukha sorry for my late answer, I really appreciate you went ahead and detailled everything. My understanding was we only needed to provide for inNixShell
in the list of arguments. As you know, Nix 2.4 was released, and I think it bundle this change.
You may be interested in this long post: https://discourse.nixos.org/t/nix-2-4-and-what-s-next/ ; I see this is fixed upstream in #1015, so this can be closed, thank you !
Thank you also.
nix --version
would helped. It in fact was 2.3.14 -> 2.3.15
minor release that broke its own code, this change still seems not documented.
Would ask within other reporting to collaborate with maintainers.
I tried the instructions to get started and encountered:
I believe this is related to the fact that
attrs
containsinNixShell
anddefault.nix
head function do not have any...
to take as many arguments as necessary?Can push the fix, if that's indeed an issue.