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

flakeref: follow symlinks #9499

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

con-f-use
Copy link

@con-f-use con-f-use commented Nov 30, 2023

fixes #9463

Motivation

Given /tmp/flakelink is a symlink to an actual flake directory, currently this happens:

$ nix build '/tmp/flakelink/#hello'
error: path '/tmp/flakelink' is not a flake (because it's not a directory)

This PR attempts to fix that.

Warning: I have no prior knowledge of the nix-codebase or much of a background in C++. Please review carefully. In particular, I do not know if there's any ramification, regarding the use of flakeref in the inputs definitions of flake.nix files or other edge-cases. @infinisil and @YorikSar pressured me into this 😉

Priorities

Add 👍 to pull requests you find important.

@zedseven
Copy link

zedseven commented Jan 8, 2024

I was about to open a PR with the same change.

This PR, if merged, would fix #8013.

@iFreilicht
Copy link
Contributor

I think this is a good and simple change. One thing I would suggest is adding a functional test for this. Have a look at this section of the manual for info on how to set this up.

@thufschmitt thufschmitt self-assigned this Mar 11, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-03-11-nix-team-meeting-132/42960/1

@con-f-use con-f-use marked this pull request as ready for review May 31, 2024 13:30
@con-f-use con-f-use requested a review from edolstra as a code owner May 31, 2024 13:30
@edolstra edolstra assigned edolstra and unassigned thufschmitt Oct 2, 2024
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

Successfully merging this pull request may close these issues.

bug: nix commands do not follow flake-url symlinks
8 participants