-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
ncurses: Build standard terminfo dirs into static ncurses #311411
Conversation
@@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { | |||
++ lib.optionals stdenv.hostPlatform.isWindows [ | |||
"--enable-sp-funcs" | |||
"--enable-term-driver" | |||
] ++ lib.optionals (stdenv.hostPlatform.isUnix && stdenv.hostPlatform.isStatic) [ | |||
] ++ lib.optionals (stdenv.hostPlatform.isUnix && (enableStatic || stdenv.hostPlatform.isStatic)) [ |
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 think it can be simplified to this:
] ++ lib.optionals (stdenv.hostPlatform.isUnix && (enableStatic || stdenv.hostPlatform.isStatic)) [ | |
] ++ lib.optionals (stdenv.hostPlatform.isUnix && enableStatic) [ |
I don't think the package would build if stdenv.hostPlatform.isStatic == true && enableStatic == false
.
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.
@midchildan Does enableStatic
get activated automatically on stdenv.hostPlatform.isStatic
?
Or do I need to change the default value for enableStatic
to stdenv.hostPlatform.isStatic
?
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.
The default value for enableStatic
already is stdenv.hostPlatform.isStatic
, so no further changes should be necessary.
, enableStatic ? stdenv.hostPlatform.isStatic |
742eb48
to
eb7fd13
Compare
Done |
@midchildan Anything else I need to do before we can merge this? I'd like to get it into |
|
@NorfairKing You'll need to get a committer to merge it. Since I reviewed this PR, you can post a link to the "PRs already reviewed" Discourse thread to give it some attention. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1637 |
Probably won't happen unless backported. The last staging-next iteration was merged a few days ago. I wonder if this should be targeting master branch though, it doesn't cause that many rebuilds. |
I could backport it once this is merged. |
I don't understand, how did you find out you need to apply this change? |
@doronbehar I was statically linking against musl with |
Exactly what expression did you try to evaluate? Could you share it please? |
@doronbehar you can check here: https://github.com/NorfairKing/smos/blob/8c7f97b3aba304e6d0ac6d36493f9c22600a4572/nix/overlay.nix#L54 |
This PR has already been approved. I just need someone to press merge, and I don't know what anyone is waiting for .. ? |
It's a bit hard for me to dive into the context there, but I'm taking from here that basically the issue with the
I asked that because I wanted to claim that if you'd run instead:
You'd get the package you are interested in, without the This case makes me think that in general we shouldn't add
I might merge it, I just want to make sure that my observations are correct. I'm sorry for you were waiting so long. Your PR is not trivial although it seems simple, which makes people afraid to break packages due to it. I'm opening a discourse thread about this issue in general. I'm sorry I wasn't transparent in my intentions when I commented here for the first time, I hope now that my concerns are clear. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
BTW this doesn't have to target |
CC @nh2 who's done |
The work that I suggest removing? Are you talking about removing the |
Yes, the discourse page https://discourse.nixos.org/t/remove-all-enablestatic-arguments-in-nixpkgs-and-instruct-people-to-use-pkgsstatic/46092 seems to suggest removing This would make impossible to link statically in a nixpkgs "version" like This PR is just following up on the years of effort that went into that, so I'm pinging him to weigh in. |
Partly wrong yes. I'm suggesting to remove
OK I wasn't aware of this effort. I had in the past good experience with |
@doronbehar I'm all for improvements but can we please make them after merging this fix ? |
OK I understand now the subtle difference between |
Aish you could have target branch |
@doronbehar thank you for the kind communication 💛 |
@doronbehar Some more background info: |
Successfully created backport PR for |
Description of changes
This builds terminfo directories into ncurses when building statically, even on non-static variants of nixpkgs.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.