From 4f9739eee32bec2b61bd2c20bcf70864b202d584 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Thu, 24 Sep 2026 17:45:11 -0400 Subject: [PATCH] dtc: unbreak on Darwin --- pkgs/by-name/dt/dtc/package.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/dt/dtc/package.nix b/pkgs/by-name/dt/dtc/package.nix index c6b4cf138b00..ac0bfd8a6eb0 100644 --- a/pkgs/by-name/dt/dtc/package.nix +++ b/pkgs/by-name/dt/dtc/package.nix @@ -71,10 +71,14 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace pyproject.toml --replace-fail "name = 'libfdt'" "name = 'pylibfdt'" ''; - # Required for installation of Python library and is innocuous otherwise. - env.DESTDIR = "/"; - # glibc 2.43 C23 const-preserving strchr/strstr macros - env.NIX_CFLAGS_COMPILE = "-Wno-error=discarded-qualifiers"; + env = { + # Required for installation of Python library and is innocuous otherwise. + DESTDIR = "/"; + } + // lib.optionalAttrs stdenv.cc.isGNU { + # glibc 2.43 C23 const-preserving strchr/strstr macros + NIX_CFLAGS_COMPILE = "-Wno-error=discarded-qualifiers"; + }; mesonAutoFeatures = "auto"; mesonFlags = [