mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 00:34:00 +00:00
Merge pull request #238027 from amjoseph-nixpkgs/pr/glibc/parallel
glibcLocales: use more than one core to build
This commit is contained in:
commit
1f72072bdd
@ -10,8 +10,9 @@
|
||||
, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
|
||||
}:
|
||||
|
||||
callPackage ./common.nix { inherit stdenv; } {
|
||||
(callPackage ./common.nix { inherit stdenv; } {
|
||||
pname = "glibc-locales";
|
||||
}).overrideAttrs(finalAttrs: previousAttrs: {
|
||||
|
||||
builder = ./locales-builder.sh;
|
||||
|
||||
@ -25,7 +26,7 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
else "--big-endian")
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
preBuild = (previousAttrs.preBuild or "") + ''
|
||||
# Awful hack: `localedef' doesn't allow the path to `locale-archive'
|
||||
# to be overriden, but you *can* specify a prefix, i.e. it will use
|
||||
# <prefix>/<path-to-glibc>/lib/locale/locale-archive. So we use
|
||||
@ -57,11 +58,15 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
fi
|
||||
|
||||
echo SUPPORTED-LOCALES='${toString locales}' > ../glibc-2*/localedata/SUPPORTED
|
||||
'' + ''
|
||||
make localedata/install-locales \
|
||||
localedir=$out/lib/locale \
|
||||
'';
|
||||
|
||||
makeFlags = (previousAttrs.makeFlags or []) ++ [
|
||||
"localedata/install-locales"
|
||||
"localedir=${builtins.placeholder "out"}/lib/locale"
|
||||
] ++ lib.optionals finalAttrs.finalPackage.enableParallelInstalling [
|
||||
"PARALLELMFLAGS=-j$(NIX_BUILD_CORES)"
|
||||
];
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p "$out/lib/locale" "$out/share/i18n"
|
||||
@ -75,4 +80,4 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
'';
|
||||
|
||||
meta.description = "Locale information for the GNU C Library";
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user