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
glibcLocales: cleaner environment handling #4320
Conversation
- make pkgs attribute null on unsupported Darwin platform - add setup hook to provide much-duplicated environment variable
Merged some part of it manually. What would be a good regular expression to grep for for the rest of NixPkgs? |
@7c6f434c just |
Maybe these could be updated together with the normal updates of such I don't like mass rebuilds, either. |
The Haskell uses |
@@ -5001,7 +5001,8 @@ let | |||
installLocales = config.glibc.locales or false; | |||
}; | |||
|
|||
glibcLocales = callPackage ../development/libraries/glibc/2.19/locales.nix { }; | |||
# Not supported on Darwin | |||
glibcLocales = if (! stdenv.isDarwin) then (callPackage ../development/libraries/glibc/2.19/locales.nix { }) else null; |
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 better to say if stdenv.isLinux then .../locales.nix else null
.
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.
@edolstra I was under the impression that glibc locales were supported everywhere but on Darwin - wrong?
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 only use glibc on Linux.
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 wonder how you plan to get locales in darwin libc (in future). If such things should be handled purely, i.e. compiling them from Apple-provided sources, then we might better have a general libcLocales or something. Of course, using system-provided libc and locales might be easiest... |
This is now partially upstream: we have locales package only for Linux. What is missing is the setupHook, I think it's a good addition save some typing on each package. I propose we make a separate commit to add that and remove redundant exports in packages. |
This seems to have died… |
A continuation/re-imagining of #4318, trying to make it cleaner.
This way, builds should find the locale archive when they add
pkgs.glibcLocales
tobuildInputs
.My only problem is that I wasn't able to test this on Linux yet. On Darwin it works fine, since it just removes everything 😁. I mocked the glibcLocales build and it did create the proper setup-hook with the correct path.