glibcLocales: fix building with llvm

This commit is contained in:
Tristan Ross 2024-08-05 21:27:08 -07:00
parent 67231dd5a4
commit e9211c2189
No known key found for this signature in database
GPG Key ID: B09C422035669AF8
2 changed files with 18 additions and 5 deletions
pkgs
development/libraries/glibc
top-level

View File

@ -8,11 +8,15 @@
{ lib, stdenv, buildPackages, callPackage, writeText, glibc
, allLocales ? true, locales ? [ "en_US.UTF-8/UTF-8" ]
, linuxHeaders, withLinuxHeaders ? !stdenv.cc.isGNU
}:
(callPackage ./common.nix { inherit stdenv; } {
(callPackage ./common.nix ({ inherit stdenv; } // lib.optionalAttrs withLinuxHeaders {
inherit linuxHeaders;
}) {
pname = "glibc-locales";
extraNativeBuildInputs = [ glibc ];
inherit withLinuxHeaders;
}).overrideAttrs(finalAttrs: previousAttrs: {
builder = ./locales-builder.sh;

View File

@ -20511,12 +20511,21 @@ with pkgs;
# Only supported on Linux and only on glibc
glibcLocales =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu
then callPackage ../development/libraries/glibc/locales.nix { }
else null;
then callPackage ../development/libraries/glibc/locales.nix {
stdenv = if (!stdenv.cc.isGNU) then
gccStdenv
else stdenv;
withLinuxHeaders = !stdenv.cc.isGNU;
} else null;
glibcLocalesUtf8 =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isGnu
then callPackage ../development/libraries/glibc/locales.nix { allLocales = false; }
else null;
then callPackage ../development/libraries/glibc/locales.nix {
stdenv = if (!stdenv.cc.isGNU) then
gccStdenv
else stdenv;
withLinuxHeaders = !stdenv.cc.isGNU;
allLocales = false;
} else null;
glibcInfo = callPackage ../development/libraries/glibc/info.nix { };