From cfb771c8a5a7b13e3d4f0ea48ca155d100c3e687 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 5 Oct 2025 13:14:36 +0200 Subject: [PATCH] glibcLocales: remove builder There's no particular reason to have a special builder. Fold all the changes it made into the derivation. --- .../libraries/glibc/locales-builder.sh | 15 ------------- pkgs/development/libraries/glibc/locales.nix | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 pkgs/development/libraries/glibc/locales-builder.sh diff --git a/pkgs/development/libraries/glibc/locales-builder.sh b/pkgs/development/libraries/glibc/locales-builder.sh deleted file mode 100644 index 6f10476f1089..000000000000 --- a/pkgs/development/libraries/glibc/locales-builder.sh +++ /dev/null @@ -1,15 +0,0 @@ -# Glibc cannot have itself in its RPATH. -export NIX_NO_SELF_RPATH=1 - -postConfigure() { - # Hack: get rid of the `-static' flag set by the bootstrap stdenv. - # This has to be done *after* `configure' because it builds some - # test binaries. - export NIX_CFLAGS_LINK= - export NIX_LDFLAGS_BEFORE= - - export NIX_DONT_SET_RPATH=1 - unset CFLAGS -} - -genericBuild diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix index 8b1a4df4838f..e8c5565ab30a 100644 --- a/pkgs/development/libraries/glibc/locales.nix +++ b/pkgs/development/libraries/glibc/locales.nix @@ -31,13 +31,25 @@ ( finalAttrs: previousAttrs: { - builder = ./locales-builder.sh; - outputs = [ "out" ]; - LOCALEDEF_FLAGS = [ - (if stdenv.hostPlatform.isLittleEndian then "--little-endian" else "--big-endian") - ]; + env = (previousAttrs.env or { }) // { + LOCALEDEF_FLAGS = if stdenv.hostPlatform.isLittleEndian then "--little-endian" else "--big-endian"; + + # Glibc cannot have itself in its RPATH. + NIX_NO_SELF_RPATH = 1; + }; + + postConfigure = (previousAttrs.postConfigure or "") + '' + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 + unset CFLAGS + ''; preBuild = (previousAttrs.preBuild or "")