-
Notifications
You must be signed in to change notification settings - Fork 108
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
input=path:./<some> does not resolve as flake.nix-relative path if no flake.lock is present (upstream nix issue) #140
Comments
Some further short commings are that we cannot use this for arbitrary files (I tried it for an AppImage) and also go modules seem to lead to problems (I think they dislike that the source is read only). |
There is an issue with the lock file not updating on pkg/flake.nix automatically. Have you ran |
the point is the initial error won't happen with flk as then you are in the correct directory, but when I am for example in my $HOME and want to rebuild my configuration in /etc/nixos then the above happens. |
I understand, I was asking for some additional context because this isn't happening when I try to replicate. I figured the first possibility is that the lock file has not been updated. |
Ah sorry, I misunderstood in that case.
|
This is definitely an upstream issue with Nix. A flake should always consider a relative path from it's root dir, for purities sake. I'll file an upstream issue on this at some point. Just want to see if perhaps I can dig up a fix first. |
Ok, this was basically my question, whether it was triggered by something in devos I overlooked or was a problem upstream. |
add an input to pkgs/flake.nix, try to run a nix command from outside the devos/nixos configuration repository.
making it into an absolute path fixes it but will probably provide issues when installing.
This will probably be an easy fix as soon as one of the upstream projects provides a solution; relevant links:
NixOS/nix#4218
edolstra/flake-compat#18
also I think the added convenience for updates even now outweighs the issue to have to cd into the nix store to do updates and so on.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: