screen: backport pending patch to fix UB in unit tests

K900 f9c5a2df 3cfcacb6

+10 -7
+10 -7
pkgs/by-name/sc/screen/package.nix
··· 2 lib, 3 stdenv, 4 fetchurl, 5 autoreconfHook, 6 ncurses, 7 libxcrypt, ··· 16 url = "mirror://gnu/screen/screen-${version}.tar.gz"; 17 hash = "sha256-La429Ns3n/zRS2kVlrpuwYrDqeIrxHrCOXiatYQJhp0="; 18 }; 19 20 configureFlags = [ 21 "--enable-telnet" ··· 23 ]; 24 25 # We need _GNU_SOURCE so that mallocmock_reset() is defined: https://savannah.gnu.org/bugs/?66416 26 - env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE=1 -Wno-int-conversion -Wno-incompatible-pointer-types"; 27 28 nativeBuildInputs = [ 29 autoreconfHook ··· 33 libxcrypt 34 pam 35 ]; 36 - 37 - # The test suite seems to have some glibc malloc hooks that don't exist/link on macOS 38 - # With pkgsLLVM / on loongarch64-linux: 39 - # tests/test-winmsgcond.c:53: assertion 'wmc_end(&wmc, pos + 1, &chg) == pos' failed 40 - doCheck = 41 - !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.useLLVM && !stdenv.hostPlatform.isLoongArch64; 42 43 meta = with lib; { 44 homepage = "https://www.gnu.org/software/screen/";
··· 2 lib, 3 stdenv, 4 fetchurl, 5 + fetchpatch, 6 autoreconfHook, 7 ncurses, 8 libxcrypt, ··· 17 url = "mirror://gnu/screen/screen-${version}.tar.gz"; 18 hash = "sha256-La429Ns3n/zRS2kVlrpuwYrDqeIrxHrCOXiatYQJhp0="; 19 }; 20 + 21 + patches = [ 22 + (fetchpatch { 23 + url = "https://file.savannah.gnu.org/file/0001-test-fix-unit-tests.patch?file_id=57558"; 24 + stripLen = 1; 25 + hash = "sha256-q3jQQrzweLf2T/V5X9iL4ZZK342QEXLG5fZTaMOB4tY="; 26 + }) 27 + ]; 28 29 configureFlags = [ 30 "--enable-telnet" ··· 32 ]; 33 34 # We need _GNU_SOURCE so that mallocmock_reset() is defined: https://savannah.gnu.org/bugs/?66416 35 + env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE=1"; 36 37 nativeBuildInputs = [ 38 autoreconfHook ··· 42 libxcrypt 43 pam 44 ]; 45 46 meta = with lib; { 47 homepage = "https://www.gnu.org/software/screen/";