mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
glibcLocales: support building on musl (#141971)
This commit is contained in:
parent
cd90002904
commit
ba06497904
@ -37,6 +37,8 @@
|
||||
, profilingLibraries ? false
|
||||
, withGd ? false
|
||||
, meta
|
||||
, extraBuildInputs ? []
|
||||
, extraNativeBuildInputs ? []
|
||||
, ...
|
||||
} @ args:
|
||||
|
||||
@ -189,8 +191,8 @@ stdenv.mkDerivation ({
|
||||
outputs = [ "out" "bin" "dev" "static" ];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ bison python3Minimal ];
|
||||
buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ];
|
||||
nativeBuildInputs = [ bison python3Minimal ] ++ extraNativeBuildInputs;
|
||||
buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ] ++ extraBuildInputs;
|
||||
|
||||
# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
|
||||
# prevent a retained dependency on the bootstrap tools in the stdenv-linux
|
||||
|
@ -6,7 +6,7 @@
|
||||
https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED
|
||||
*/
|
||||
|
||||
{ lib, stdenv, buildPackages, callPackage, writeText
|
||||
{ lib, stdenv, buildPackages, callPackage, writeText, glibc
|
||||
, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
|
||||
}:
|
||||
|
||||
@ -17,6 +17,8 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
extraNativeBuildInputs = [ glibc ];
|
||||
|
||||
# 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
|
||||
@ -24,7 +26,7 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
# $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive.
|
||||
buildPhase =
|
||||
''
|
||||
mkdir -p $TMPDIR/"${buildPackages.stdenv.cc.libc.out}/lib/locale"
|
||||
mkdir -p $TMPDIR/"${buildPackages.glibc.out}/lib/locale"
|
||||
|
||||
echo 'C.UTF-8/UTF-8 \' >> ../glibc-2*/localedata/SUPPORTED
|
||||
|
||||
|
@ -16250,8 +16250,8 @@ with pkgs;
|
||||
|
||||
relibc = callPackage ../development/libraries/relibc { };
|
||||
|
||||
# Only supported on Linux, using glibc
|
||||
glibcLocales = if stdenv.hostPlatform.libc == "glibc" then callPackage ../development/libraries/glibc/locales.nix { } else null;
|
||||
# Only supported on Linux
|
||||
glibcLocales = if stdenv.hostPlatform.isLinux then callPackage ../development/libraries/glibc/locales.nix { } else null;
|
||||
|
||||
glibcInfo = callPackage ../development/libraries/glibc/info.nix { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user