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 autoreconfHook, 7 perl, 8 gdb, 9 - cctools, 10 - xnu, 11 - bootstrap_cmds, 12 writeScript, 13 }: 14 ··· 56 57 # GDB is needed to provide a sane default for `--db-command'. 58 # 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 - ]; 68 69 # Perl is also a native build input. 70 nativeBuildInputs = [ ··· 75 enableParallelBuilding = true; 76 separateDebugInfo = stdenv.hostPlatform.isLinux; 77 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}" 91 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"; 112 113 doCheck = true; 114 ··· 157 darwin ++ freebsd ++ illumos ++ linux 158 ); 159 badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ]; 160 - broken = stdenv.hostPlatform.isDarwin; # https://hydra.nixos.org/build/128521440/nixlog/2 161 }; 162 }
··· 6 autoreconfHook, 7 perl, 8 gdb, 9 writeScript, 10 }: 11 ··· 53 54 # GDB is needed to provide a sane default for `--db-command'. 55 # Perl is needed for `callgrind_{annotate,control}'. 56 + buildInputs = [ 57 + gdb 58 + perl 59 + ]; 60 61 # Perl is also a native build input. 62 nativeBuildInputs = [ ··· 67 enableParallelBuilding = true; 68 separateDebugInfo = stdenv.hostPlatform.isLinux; 69 70 + preConfigure = lib.optionalString stdenv.hostPlatform.isFreeBSD '' 71 + substituteInPlace configure --replace-fail '`uname -r`' ${stdenv.cc.libc.version}- 72 + ''; 73 74 + configureFlags = lib.optional stdenv.hostPlatform.isx86_64 "--enable-only64bit"; 75 76 doCheck = true; 77 ··· 120 darwin ++ freebsd ++ illumos ++ linux 121 ); 122 badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ]; 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; 128 }; 129 }
+1 -3
pkgs/top-level/all-packages.nix
··· 8175 jdk = jdk11; 8176 }; 8177 8178 - valgrind = callPackage ../development/tools/analysis/valgrind { 8179 - inherit (buildPackages.darwin) xnu bootstrap_cmds; 8180 - }; 8181 valgrind-light = (res.valgrind.override { gdb = null; }).overrideAttrs (oldAttrs: { 8182 meta = oldAttrs.meta // { 8183 description = "${oldAttrs.meta.description} (without GDB)";
··· 8175 jdk = jdk11; 8176 }; 8177 8178 + valgrind = callPackage ../development/tools/analysis/valgrind { }; 8179 valgrind-light = (res.valgrind.override { gdb = null; }).overrideAttrs (oldAttrs: { 8180 meta = oldAttrs.meta // { 8181 description = "${oldAttrs.meta.description} (without GDB)";