diff --git a/pkgs/by-name/xt/xterm/package.nix b/pkgs/by-name/xt/xterm/package.nix index b3ceeac4b34b..5eb767f1ff86 100644 --- a/pkgs/by-name/xt/xterm/package.nix +++ b/pkgs/by-name/xt/xterm/package.nix @@ -1,6 +1,18 @@ -{ lib, stdenv, fetchurl, xorg, ncurses, freetype, fontconfig -, pkg-config, makeWrapper, nixosTests, gitUpdater -, enableDecLocator ? true }: +{ + lib, + stdenv, + fetchurl, + xorg, + ncurses, + freetype, + fontconfig, + pkg-config, + makeWrapper, + nixosTests, + pkgsCross, + gitUpdater, + enableDecLocator ? true, +}: stdenv.mkDerivation rec { pname = "xterm"; @@ -18,7 +30,11 @@ stdenv.mkDerivation rec { strictDeps = true; - nativeBuildInputs = [ makeWrapper pkg-config fontconfig ]; + nativeBuildInputs = [ + makeWrapper + pkg-config + fontconfig + ]; buildInputs = [ xorg.libXaw @@ -48,13 +64,15 @@ stdenv.mkDerivation rec { "--with-app-defaults=$(out)/lib/X11/app-defaults" ] ++ lib.optional enableDecLocator "--enable-dec-locator"; - 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"; - }; + 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 @@ -78,6 +96,7 @@ stdenv.mkDerivation rec { tests = { customTest = nixosTests.xterm; standardTest = nixosTests.terminal-emulators.xterm; + musl = pkgsCross.musl64.xterm; }; updateScript = gitUpdater {