nix-required-mounts: support deep symlinks; refactor & test#500971
Conversation
4acdde7 to
67747fd
Compare
|
kmein
left a comment
There was a problem hiding this comment.
Functionality-wise, everything looks really good. I've left a few inline comments throughout the patch—mostly just some naming questions and minor nitpicks around type hints and a small optimization.
Let me know what you think of those, but overall this is in great shape!
|
TODO:
|
d6e144a to
f2797ce
Compare
There was a problem hiding this comment.
This is still a git mv. With py_modules in pyproject.toml it should be fine to just keep the top-level module
There was a problem hiding this comment.
on the one hand there is the git mv, on the other hand it's much more ergonomic during development to have all files that belong to the actual tool without the extra stuff in one folder. Especially because you don't have to explain black, mypy, and pytest, which files to ignore.
I understand preserving blame history is useful, but is it more useful than tool ergonomy while maintaining the app?
There was a problem hiding this comment.
If this somehow affects ergonomics in your environment, there is something off about your environment. Top-level modules are perfectly normal and should not cause any issues.
|
Can you please clarify your request to me or is this only a comment?
Not a blocker
…On 7 April 2026 06:59:25 UTC, Jacek Galowicz ***@***.***> wrote:
@tfc commented on this pull request.
> + assert ss(
+ discover_reachable_paths(
+ [root / "c", root / "f"], follow_symlinks=True
+ )
+ ) == ss(
+ # fmt: off
Can you please clarify your request to me or is this only a comment?
|
|
|
I'd say
And we're done. |
ad2f868 to
e08b757
Compare
|
@SomeoneSerge done |
|
ok there are pipeline errors because i used As the app has only been touched 3 times in the last 2 years i would rather drop the git history and go back to the subfolder. This way, the closure .py and .nix files and everything else does not become part of the package closure. Please advise. |
|
RE: fileset Wow this warning is ludicrous, EDIT: So one more "nix doesn't vfs" issue, breaking a documented nixpkgs functionality... |
|
@tfc I can't deny I'm partially motivated by spite, but I want this to be |
|
@SomeoneSerge understandable. done. |
Breaking change: instead of expanding a single symlink chain, unsafeFollowSymlinks now walks directories recursively and mounts all symlink descendants' targets. This accommodates usecases like: /sys/dev/char/226:128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128 /sys/dev/char/226:128/subsystem -> ../../../../../class/drm Fixes issue NixOS#497824 Co-authored-by: SomeoneSerge <else@someonex.net>
I have been running cuda apps on both NVIDIA and AMD (with ZLUDA) graphics cards and found that nix-required-mounts produced some problems:
While fixing these issues, i decided that the scenario is complex enough for test cases, so i wrote those and restructured the app a bit to make it more testable.
Tested these changes again on two NVIDIA and AMD machines, works very nicely.
Fixes #497824
CC @SomeoneSerge @ConnorBaker @kmein @jfly
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.