-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
darwin.locale: restore locale data #347817
Conversation
I will merge this in a bit (trying to avoid a |
# Update `bsdmake` references to `bmake` | ||
substituteInPlace "$LOCALE_TOPLEVEL/Makefile" \ | ||
--replace-fail bsdmake bmake |
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 guess we don’t have the exact bsdmake
Apple expects?
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.
We don’t because I deleted it and replaced it with bmake, which is the portable BSD make from NetBSD.
buildPhase = | ||
'' | ||
ninjaBuildPhase | ||
'' |
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 is missing the preBuild
/postBuild
hooks. Is there a way to just put the bmake
stuff in postBuild
, or maybe we can make the hooks compose better somehow?
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.
ninjaBuildPhase
and bmakeBuildPhase
run the hooks. Putting bmakeBuildPhase
in postBuild
causes it to go into an infinite loop. I want the flag handling of both hooks without their invoking preBuild
and postBuild
hooks, but there’s no way to do that currently.
# Cross-compilation requires using adv_cmds from the buildPlatform. | ||
( | ||
if stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform then | ||
'' | ||
export PATH=$PWD:$PATH | ||
'' | ||
else | ||
'' | ||
export PATH=$PWD:${lib.getBin buildPackages.darwin.adv_cmds}/bin | ||
'' | ||
) |
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.
Actually, why don’t we just split this locale stuff back into its own package? This clearly just wants a nativeBuildInputs = [ darwin.adv_cmds ];
, we’re having to compose two separate build systems in one derivation, and one of them goes to a different output anyway. I think it would be a lot nicer to just have a separate package for the locale data.
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.
It’s not unusual for a package that needs to generate some data to have special handling for cross-compilation (e.g., ICU and ncurses). I can move it to a passthru derivation, so adv_cmds.locale
works as it did before.
697e899
to
7354aeb
Compare
The locale data used on macOS has not been included in a source release since adv_cmds-118. Fortunately, that data can be parsed by the current version of adv_cmds. It’s a bit old, but other sources of data (such as FreeBSD) are not compatible enough and may cause divergent behavior.
7354aeb
to
8cabf98
Compare
8cabf98
to
840a4f7
Compare
This is a follow up to #346043 to add the missing locale data. It’s not exactly the same as the data used on macOS, but it’s close. This is being done separately in case the PR is rejected.
Replacement for #347642.
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.