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
llvm-packages: fix manpages on darwin #44164
Conversation
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.
Thank you, this is much needed on Darwin.
Success on x86_64-darwin (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: llvm-manpages Partial log (click to expand)
|
pkgs/stdenv/darwin/default.nix
Outdated
@@ -386,7 +378,7 @@ in rec { | |||
|
|||
# Hack to avoid man pages in stdenv, building bootstrap python |
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.
Make sure you update this comment.
@@ -6213,6 +6213,7 @@ with pkgs; | |||
}; | |||
|
|||
clang = llvmPackages.clang; | |||
clang-manpages = llvmPackages.clang-manpages; |
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.
I definitely dislike this because with basically every other package you can just do ${lib.getOutput "man" pkg}/share/man
to get the manpages. I guess it's okay as a short term fix but it just seems like something to be avoided. What if we just made this clang = llvmPackages.clang-manpages
? I think most users want clang with manpages & this will only be used when people are doing nix-env -iA nixpkgs.clang
(stdenv uses llvmPackages directly IIRC).
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.
clang and clang-manpages are 2 separate packages.
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.
Also nix-env -i clang is bad practice and doesn't even work properly. Given #24717 I actually consider this to be an advantage.
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.
FWIW If we bind clang-manpages
and clang-nomanpages
, we can in a "late bind" fashion do the man output trick so that the bootstrap-persisted clang and fresh manpages are combined together
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.
Ok I guess it is okay in this instance just because of the complications of bootstrapping/stdenv. But in general asking people to remember things like x-manpages
seems like a bad idea. #24717 is definitely a bug that affects this but we shouldn't let it dictate how these things work.
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.
I'm a bit reluctant to do that given the problems it's caused so far. But yes, that's an option.
On darwin llvmPackages is built using python-boot to avoid dependencies in the stdenv, but we can't and shouldn't use that when building the manpages since it depends on python packages.
Only for the default version, we probably shouldn't be exposing most attributes all versions.
Success on x86_64-darwin (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: llvm-manpages Partial log (click to expand)
|
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.
Per https://github.com/NixOS/nixpkgs/pull/44164/files#r205919591 we can fix .man
better than it was later. Nice job matching what 6 did already, too.
Motivation for this change
Fixes manpages and removes
.man
attribute./cc @Ericson2314 @jwiegley
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)