From 5ab79f9898eb375b00f7624074dc87d92a091f17 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Thu, 12 Dec 2024 01:27:06 -0800 Subject: [PATCH 1/3] stdenv/darwin: remove libunistring libunistring doesn't appear to be used in the stdenv build and thus if it is modified will result in 59k rebuilds. Removing from stdenv reduces rebuilds if libunistring is modified to 37k. --- pkgs/stdenv/darwin/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 6cc22dd8bb0d..dd5993b36695 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -1198,7 +1198,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check ld64.out libffi.out libtapi.out - libunistring.out libxml2.out ncurses.dev ncurses.man From 0182edcf58c8603704ec4a285e2ecf4733a9e5d1 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Wed, 11 Dec 2024 23:10:32 -0800 Subject: [PATCH 2/3] libunistring: use gnu libiconv on darwin https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00375.html macoOS libiconv 14 & 15 do not work with libunistring and a configure test added in 1.3 rejects even building with it so use gnu libiconv on darwin --- pkgs/development/libraries/libunistring/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix index 3e7ee28dde4c..5d2eb67c3a08 100644 --- a/pkgs/development/libraries/libunistring/default.nix +++ b/pkgs/development/libraries/libunistring/default.nix @@ -3,9 +3,17 @@ lib, stdenv, libiconv, + libiconvReal, updateAutotoolsGnuConfigScriptsHook, darwin, -}: +}@args: + +let + # https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00375.html + # macoOS libiconv 14 & 15 do not work with libunistring and a configure test + # added in 1.3 rejects even building with it so use gnu libiconv on darwin + libiconv = if stdenv.hostPlatform.isDarwin then libiconvReal else args.libiconv; +in # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -30,9 +38,6 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; propagatedBuildInputs = lib.optional (!stdenv.hostPlatform.isLinux) libiconv; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.CoreServices - ]; nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; configureFlags = [ "--with-libiconv-prefix=${libiconv}" ]; From 5587af11e3446f6233c2486da9b5dcf8b8f7902b Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Fri, 13 Dec 2024 15:39:54 -0800 Subject: [PATCH 3/3] Revert "guile: workaround for libunistring / darwin libiconv" This reverts commit 76cca7e72cdc966615f3c157c2c230c640d29c27. workaround is unneeded with commit 0182edcf58c8603704ec4a285e2ecf4733a9e5d1 --- pkgs/development/interpreters/guile/2.0.nix | 9 +-------- pkgs/development/interpreters/guile/2.2.nix | 9 +-------- pkgs/development/interpreters/guile/3.0.nix | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 73b813c6b003..ad542da64325 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -11,22 +11,15 @@ libffi, libtool, libunistring, - libiconvReal, makeWrapper, pkg-config, pkgsBuildBuild, readline, -}@args: +}: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; - # workaround for libiconv bug in macOS 14/15 - libunistring = - if stdenv.hostPlatform.isDarwin then - args.libunistring.override { libiconv = libiconvReal; } - else - args.libunistring; in builder rec { pname = "guile"; diff --git a/pkgs/development/interpreters/guile/2.2.nix b/pkgs/development/interpreters/guile/2.2.nix index 1e027408ef67..deb74210bdb7 100644 --- a/pkgs/development/interpreters/guile/2.2.nix +++ b/pkgs/development/interpreters/guile/2.2.nix @@ -11,22 +11,15 @@ libffi, libtool, libunistring, - libiconvReal, makeWrapper, pkg-config, pkgsBuildBuild, readline, -}@args: +}: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; - # workaround for libiconv bug in macOS 14/15 - libunistring = - if stdenv.hostPlatform.isDarwin then - args.libunistring.override { libiconv = libiconvReal; } - else - args.libunistring; in builder rec { pname = "guile"; diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix index a1227d1774c9..473c05ea8383 100644 --- a/pkgs/development/interpreters/guile/3.0.nix +++ b/pkgs/development/interpreters/guile/3.0.nix @@ -11,24 +11,17 @@ libffi, libtool, libunistring, - libiconvReal, libxcrypt, makeWrapper, pkg-config, pkgsBuildBuild, readline, writeScript, -}@args: +}: let # Do either a coverage analysis build or a standard build. builder = if coverageAnalysis != null then coverageAnalysis else stdenv.mkDerivation; - # workaround for libiconv bug in macOS 14/15 - libunistring = - if stdenv.hostPlatform.isDarwin then - args.libunistring.override { libiconv = libiconvReal; } - else - args.libunistring; in builder rec { pname = "guile";