-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
clang-tools: move into llvmPackages #191698
base: master
Are you sure you want to change the base?
Conversation
@ofborg build bat-extras.prettybat cloudcompare entwine grass libpulsar nominatim pdal python310Packages.tiledb python39Packages.tiledb qgis qgis-ltr tiledb vscode-extensions.ms-vscode-cpptools |
ab4a3db
to
17cfd70
Compare
Just seperate those Python scripts to a new output It will still be installed as Thank you for your time and patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty neat 🙂
Could it be merged now? Or should I split the wrapped python script into a new derivation |
The changes look fine to me -- I don't personally have merging rights, though 👀 |
No wonder. I had thought that all the members have the merging right. |
96c7c4e
to
eaffbf1
Compare
Just make a new derivation Wrapping the Python scripts into a new package also guarantees zero rebuild of the current packages, and is thus easier to backport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/1507 |
6f5a41c
to
95e28fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just resolve the conflicts and this should be good to go.
@RossComputerGuy The release note entry is inside |
@ShamrockLee I don't think it's too late to backport. Imo, release note entries are not that important for something like this. |
Format default.nix with nixfmt in accordance with Nix RFC 166. Manually Place the comments above the corresponding argument.
I think we should maybe get a second opinion on this; breaking changes are restricted <4 weeks before 24.05's release and changing the
I think it's worth having, especially since the intent (as per the OP) is to phase out the aliases that were added. |
637c2de
to
0179f8c
Compare
@rrbutani Not sure if the change of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, couple of nits about the release note entry:
0179f8c
to
08b287c
Compare
|
||
pname = "clang-tools"; | ||
version = lib.getVersion unwrapped; | ||
version = lib.getVersion clang-unwrapped; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the scope that's used in llvmPackages
already has version
:
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; }); |
You should be able to drop clang-unwrapped
from this package's attrs (and all of the llvmPackages_*
set's callPackage
s for clang-tools
) and just ask for version
in this package's attrs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since clang-tools
is a wrapper of (a part of) clang-unwrapped
, the build process would be more straightforward to pass clang-unwrapped
as a shell variable. It's also okay to string-interpolate it directly.
As for the version, it makes sense to pass it from the llvmPackage an <pkg>.override
argument.
You should be able to drop clang-unwrapped from this package's attrs
Are we removing the attribute to prevent people from accessing the clang-unwrapped
package used via the attribute (or even try to override it via <pkg>.overrideAttrs
) but encourage accessing/overriding via llvmPackages
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies, I missed that the $out/bin
symlinks are produced from clang-unwrapped
and not clang
/libcxxClang
.
Please disregard the above; getting version
from clang-unwrapped
seems like the sensible thing to do.
oh, good point! here, let's ask: @wegank This PR changes some top-level attrs to be aliases and changes some package attributes such that existing |
I'd consider the change of argument for |
08b287c
to
d5a1b67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShamrockLee thanks for working on this; one last minor change and this will be good to merge:
Add 24.11 release note entry about moving clang-tools into llvmPackages and making clang-tools_<version> aliases.
d5a1b67
to
2afbfa2
Compare
Description of changes
Format the Nix expression of
clang-tools
usingnixfmt
, in accordance with NixOS/rfcs#166.Move the The clang-tools expression folder under
llvm/common
andclang-tools
package underllvmPackages
.Move
clang-tools_<version>
intoaliases.nix
, specifying asllvmPackages_<version>.clang-tools
.Provideclang-tools-python
that links and wraps executables fromclang-unwrapped.python
output. If applied, users will be able to enjoygit clang-format
withclang-tools-python
installed (or introduced inside Nix shell).As for"${clang-unwrapped.python}/bin/scan-view"
, it depends on the relative module inside"../share"
. The dependent module ofscan-view
,ScanView.py
, is currently not moved intoclang-unwrapped.python
, which will be fixed by the staging PR #191801.Cc:
@Patryk27 clang-tools maintainer
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage (The 24 updated packages will take some time to build.)./result/bin/
) (Tested git-clang-format, but not scan-view)nixos/doc/manual/md-to-db.sh
to update generated release notes