From 656709bceb2d9f86c5b971f0ec53bbfbac0de543 Mon Sep 17 00:00:00 2001 From: Yureka Date: Mon, 20 Mar 2023 15:34:09 +0100 Subject: [PATCH] pkgsMusl.xterm: fix build (#220731) --- pkgs/applications/terminal-emulators/xterm/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/xterm/default.nix b/pkgs/applications/terminal-emulators/xterm/default.nix index 5eb565227a94..78c64e9ca3c3 100644 --- a/pkgs/applications/terminal-emulators/xterm/default.nix +++ b/pkgs/applications/terminal-emulators/xterm/default.nix @@ -54,8 +54,13 @@ stdenv.mkDerivation rec { "--with-app-defaults=$(out)/lib/X11/app-defaults" ] ++ lib.optional enableDecLocator "--enable-dec-locator"; - # Work around broken "plink.sh". - NIX_LDFLAGS = "-lXmu -lXt -lICE -lX11 -lfontconfig"; + env = { + # Work around broken "plink.sh". + NIX_LDFLAGS = "-lXmu -lXt -lICE -lX11 -lfontconfig"; + } // lib.optionalAttrs stdenv.hostPlatform.isMusl { + # Various symbols missing without this define: TAB3, NLDLY, CRDLY, BSDLY, FFDLY, CBAUD + NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + }; # Hack to get xterm built with the feature of releasing a possible setgid of 'utmp', # decided by the sysadmin to allow the xterm reporting to /var/run/utmp