| 7 Nov 2025 |
connor (burnt/out) (UTC-8) | some want to move away from shell (or to a different shell) for setup hooks, others want to enable more radical changes like the ability to use python for setup hooks or even to replace some or all of setup.sh | 09:44:29 |
Daniel Fahey | I wrote this recently https://github.com/NixOS/nixpkgs/pull/448828/files#diff-e82c6e9710143cae7452bab94f76c5adedbfc093ca951aa0a0f634d661ef5833 | 09:44:46 |
connor (burnt/out) (UTC-8) | there's been a big effort to get python3Minimal usable within the bootstrap iirc | 09:44:52 |
connor (burnt/out) (UTC-8) | okay I need to sleep | 09:46:52 |
Daniel Fahey | gn gg | 09:47:35 |
connor (burnt/out) (UTC-8) | SomeoneSerge (back on matrix) Gaétan Lepage this is kind of what I mentioned in the weekly meeting about needing to remove the stubs from the runpath; it doesn't do everything but it's a start. For example, this should unbreak packages which link against stubs and don't use autoAddDriverRunpath --in that case the runpath wouldn't be prefixed by /run/opengl-driver/lib so the stubs would be discovered and loaded and runtime would fail. | 09:48:48 |
Gaétan Lepage | Ok neat! | 09:53:37 |
Daniel Fahey | Really, really high quality bash, fan of Wooledge I presume? And the integration with the Nix for the testing 👨🍳 😘, thanks for exposing me to this. I did a lot of bash in my old job inside Makefiles, looking at this has made me remember how much I love bash. Sorry for my tongue in cheek Python remark. | 11:01:25 |
SomeoneSerge (matrix works sometimes) | This sounds like bootstrap hell? | 13:22:29 |
SomeoneSerge (matrix works sometimes) | Gonna read, but what I wanted to ask when you were leaving was that we had already introduced some complex bash logic for ensuring the order of hooks, which was meant to ensure that adddriversrunpath and addcudacompat take priority over stubs, which must have clearly regressed if you found cleaning runpaths necessary, so why not fix that instead?
Licensing issues aside, I'd rather have stubs with customized messages linked...
| 13:28:03 |
SomeoneSerge (matrix works sometimes) | * | 13:34:14 |
connor (burnt/out) (UTC-8) | The logic I was thinking of that did that was never merged IIRC
I had implemented it in my CUDA-packages repo but it required many more of the array utility functions I wrote to do hook de-ordering, filtering, removal of duplicates, etc.
Upstream didn’t want to review or include them in tree if there were no users and also wouldn’t have accepted me putting my CUDA changes in the PR introducing those hooks so i gave up 🤷♂️ | 17:01:58 |
connor (burnt/out) (UTC-8) | The CUDA compat path and driver link lib path should appear before any stub directory entries in the runpath… but we also shouldn’t have any stub directory entries in the runpath | 17:03:24 |
connor (burnt/out) (UTC-8) | The other approach I took was to register a function, which registers all the other functions present in the setup hook, to be executed during prePhases.
Since that’s an insane thing to do, it ensures that our hooks are the last in the order of every phase we’re adding them to.
https://github.com/ConnorBaker/cuda-packages/blob/8a317116a07717b13e0608f47b78bd6d75f8bb99/pkgs/development/cuda-modules/packages/nvccHook/nvccHook.bash#L24
| 17:10:55 |