-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
llvmPackages should be more easily overridable #375431
Comments
This is a future project of mine that I plan on doing, I haven't had the time to focus on it yet and there's more important things I've been doing. |
@RossComputerGuy do you have a vague idea when you expect to get to this? I could give it a try if you don't anticipate getting to it for a long time. |
Probably after the |
This would be of interest to the Darwin bootstrap. It would allow the bootstrap-specific hacks in the LLVM derivations to be removed. It might even make it possible to rely on the wrapper definitions in LLVM instead of inlining them into the bootstrap. |
Yeah, also to add what I mentioned on Matrix. I'm thinking of staging LLVM similarly to how we do it for the stdenv bootstrap. This will likely be the bulk of the work but I would like to work on after some of the other PR's I have are done. The reason being is merge conflicts. However, I am able to start some of the pre-work. The first thing being, moving patches from |
Decided to nixfmt everything for LLVM in #376179 since I'm getting tired of looking at the old formatting. This will make the next set of work easier to perform. |
That's correct. It does allow you to get an overridden llvmPackages, but only for things that are fed through the inputs. So you can't straightforwardly override libllvm's attrs in the way you want. It is possible, but it not straightforward, especially in various cross scenarios. It would be good to make it so. |
llvmPackages doesn't support overrideScope so it's a pain to override its parts. If you override libllvm you need to manually override everything else that references it including patches. It's easy to accidentally allow a non-overridden copy of libllvm to sneak in.
Example of not-fun overriding lots of separate packages in https://github.com/NixOS/nixpkgs/blob/0f5740f6d9c3d0feb3da06e1da2383204fd6f92e/pkgs/development/rocm-modules/6/llvm/default.nix
There seems to be some support for overriding with .override but it's not clear how to use it. You can't use
nixpkgs/pkgs/development/compilers/llvm/common/default.nix
Lines 30 to 34 in 0f5740f
cc @dtzWill @Ericson2314 @lovek323 @alyssais @RossComputerGuy @rrbutani @sternenseemann
The text was updated successfully, but these errors were encountered: