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

full_deps doesn't seem to work well with NixOS #397

Open
ChengCat opened this issue Jun 13, 2020 · 5 comments
Open

full_deps doesn't seem to work well with NixOS #397

ChengCat opened this issue Jun 13, 2020 · 5 comments

Comments

@ChengCat
Copy link

In NixOS, tup often rebuilds the whole project when updater.full_deps is enabled. I tried various command line arguments, but tup doesn't seem to explain in the output why the rebuilding is needed.

I may have some idea why the rebuilding happens, and wonder whether the issue is fixable on the tup side. In NixOS gcc and other binaries live in a path like /run/current-system/sw/bin/gcc, and /run/current-system is a symlink, which mtime changes on every reboot

@sheenobu
Copy link

I think you can use nix-shell with --pure. /run/current-system will not be in $PATH so you won't see any changes. even on a reboot. PATH should just contain the dependencies in /nix/store you specify via nix-shell or a shell.nix file. Testing it myself now.

@sheenobu
Copy link

Actually when using --pure, fusermount doesn't have the setuid bit so it will not be able to unmount the tup FUSE mount. The setuid wrappers are in /run/wrappers/bin but those are just like /run/current-system.

In this case, the remaining issue is that fusermount/fusermount3 is looked up via PATH while PATH, if I understand, is used to calculate rebuilding.

#ifdef FUSE3
rc = system("fusermount3 -u -z " TUP_MNT);
#else
rc = system("fusermount -u -z " TUP_MNT);
#endif

@ChengCat
Copy link
Author

@sheenobu Thanks for this idea! I think one would want to use nix-shell --pure for greater build reproducibility anyway.

@sheenobu
Copy link

Added a wiki entry for NixOS so that users have a place to go to for figuring out the weird edge cases for nixos. The two now are this one and pkg-config:

https://nixos.wiki/wiki/Tup

@ehmry
Copy link

ehmry commented Nov 26, 2022

I think this has been dealt with now? The fusermount problem was fixed and we've documented the workarounds on our wiki.

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

3 participants