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

[BUG] --out-link does not work #65

Open
hjkatz opened this issue May 28, 2024 · 6 comments
Open

[BUG] --out-link does not work #65

hjkatz opened this issue May 28, 2024 · 6 comments

Comments

@hjkatz
Copy link

hjkatz commented May 28, 2024

I think --out-link is being overridden by this logic here. Could you help confirm?

else:
args += [
"--out-link",
opts.out_link + "-" + attr,
]

@hjkatz
Copy link
Author

hjkatz commented May 28, 2024

I expect that --out-link path/to/out should link to path/to/out not path/to/out-<attr> because when attr is unset (for --flake) then we see path/to/out- (notice the trailing -) which is different than what we specified in the option.

@Mic92
Copy link
Owner

Mic92 commented May 29, 2024

We kind of depend on --out-link to have a gcroot. Than the package can be uploaded afterwards without things getting garbage collected right away.

@hjkatz
Copy link
Author

hjkatz commented May 29, 2024

@Mic92 Could you explain with an example? What do you mean by gcroot?

@Mic92
Copy link
Owner

Mic92 commented Jun 10, 2024

A gcroot is a link that prevents nix from deleting files when using nix-collect-garbage. If you use nix-build '<nixpkgs>' -A hello, it will also put a symlink called result in the current directory. That symlink also serves as a gcroot.

@hjkatz
Copy link
Author

hjkatz commented Jun 10, 2024

I'm not understanding how --out-link=/my/custom/path.out would cause that gcroot to not be considered by nix. Must the out-link be named result- with no attribute?

@Mic92
Copy link
Owner

Mic92 commented Jun 11, 2024

It probably would be but we would still need to append a custom suffix somehow since we build several builds instead of just one, and the name would clash here between those.

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