valgrind: remove Darwin‐related dead code

This has been broken on Darwin since 2020 and depends on deprecated
stubs. Best to remove it until someone figures out how to get it
working again than spend effort tidying up dead code.

Emily 28bd9e73 259dc71e

+14 -49
+13 -46
pkgs/development/tools/analysis/valgrind/default.nix
··· 6 6 autoreconfHook, 7 7 perl, 8 8 gdb, 9 - cctools, 10 - xnu, 11 - bootstrap_cmds, 12 9 writeScript, 13 10 }: 14 11 ··· 56 53 57 54 # GDB is needed to provide a sane default for `--db-command'. 58 55 # Perl is needed for `callgrind_{annotate,control}'. 59 - buildInputs = 60 - [ 61 - gdb 62 - perl 63 - ] 64 - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 65 - bootstrap_cmds 66 - xnu 67 - ]; 56 + buildInputs = [ 57 + gdb 58 + perl 59 + ]; 68 60 69 61 # Perl is also a native build input. 70 62 nativeBuildInputs = [ ··· 75 67 enableParallelBuilding = true; 76 68 separateDebugInfo = stdenv.hostPlatform.isLinux; 77 69 78 - preConfigure = 79 - lib.optionalString stdenv.hostPlatform.isFreeBSD '' 80 - substituteInPlace configure --replace-fail '`uname -r`' ${stdenv.cc.libc.version}- 81 - '' 82 - + lib.optionalString stdenv.hostPlatform.isDarwin ( 83 - let 84 - OSRELEASE = '' 85 - $(awk -F '"' '/#define OSRELEASE/{ print $2 }' \ 86 - <${xnu}/Library/Frameworks/Kernel.framework/Headers/libkern/version.h)''; 87 - in 88 - '' 89 - echo "Don't derive our xnu version using uname -r." 90 - substituteInPlace configure --replace "uname -r" "echo ${OSRELEASE}" 70 + preConfigure = lib.optionalString stdenv.hostPlatform.isFreeBSD '' 71 + substituteInPlace configure --replace-fail '`uname -r`' ${stdenv.cc.libc.version}- 72 + ''; 91 73 92 - # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666). 93 - echo "getting rid of the \`-arch' GCC option..." 94 - find -name Makefile\* -exec \ 95 - sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \; 96 - 97 - sed -i coregrind/link_tool_exe_darwin.in \ 98 - -e 's/^my \$archstr = .*/my $archstr = "x86_64";/g' 99 - 100 - substituteInPlace coregrind/m_debuginfo/readmacho.c \ 101 - --replace /usr/bin/dsymutil ${stdenv.cc.bintools.bintools}/bin/dsymutil 102 - 103 - echo "substitute hardcoded /usr/bin/ld with ${cctools}/bin/ld" 104 - substituteInPlace coregrind/link_tool_exe_darwin.in \ 105 - --replace /usr/bin/ld ${cctools}/bin/ld 106 - '' 107 - ); 108 - 109 - configureFlags = 110 - lib.optional stdenv.hostPlatform.isx86_64 "--enable-only64bit" 111 - ++ lib.optional stdenv.hostPlatform.isDarwin "--with-xcodedir=${xnu}/include"; 74 + configureFlags = lib.optional stdenv.hostPlatform.isx86_64 "--enable-only64bit"; 112 75 113 76 doCheck = true; 114 77 ··· 157 120 darwin ++ freebsd ++ illumos ++ linux 158 121 ); 159 122 badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ]; 160 - broken = stdenv.hostPlatform.isDarwin; # https://hydra.nixos.org/build/128521440/nixlog/2 123 + # See: <https://hydra.nixos.org/build/128521440/nixlog/2> 124 + # 125 + # Darwin‐specific derivation logic has been removed, check the 126 + # history if you want to fix this. 127 + broken = stdenv.hostPlatform.isDarwin; 161 128 }; 162 129 }
+1 -3
pkgs/top-level/all-packages.nix
··· 8175 8175 jdk = jdk11; 8176 8176 }; 8177 8177 8178 - valgrind = callPackage ../development/tools/analysis/valgrind { 8179 - inherit (buildPackages.darwin) xnu bootstrap_cmds; 8180 - }; 8178 + valgrind = callPackage ../development/tools/analysis/valgrind { }; 8181 8179 valgrind-light = (res.valgrind.override { gdb = null; }).overrideAttrs (oldAttrs: { 8182 8180 meta = oldAttrs.meta // { 8183 8181 description = "${oldAttrs.meta.description} (without GDB)";