Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions pkgs/development/tools/analysis/valgrind/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
# Fix build on ELFv2 powerpc64
# https://bugs.kde.org/show_bug.cgi?id=398883
(fetchurl {
url = "https://github.com/void-linux/void-packages/raw/3e16b4606235885463fc9ab45b4c120f1a51aa28/srcpkgs/valgrind/patches/elfv2-ppc64-be.patch";
sha256 = "NV/F+5aqFZz7+OF5oN5MUTpThv4H5PEY9sBgnnWohQY=";
url = "https://git.adelielinux.org/adelie/packages/-/raw/f9558def812134e8c40d4d71d5c1cb7f998a4c48/user/valgrind/0001-Ensure-ELFv2-is-supported-on-PPC64.patch";
hash = "sha256-ESjJWnjLXcu75y1TYpDK022CFc8lcdt4ISvxu8wXlxM=";
})
# Fix checks on Musl.
# https://bugs.kde.org/show_bug.cgi?id=453929
Expand Down Expand Up @@ -87,7 +87,8 @@ stdenv.mkDerivation rec {
lib.optional stdenv.hostPlatform.isx86_64 "--enable-only64bit"
++ lib.optional stdenv.hostPlatform.isDarwin "--with-xcodedir=${xnu}/include";

doCheck = true;
# PPC64 ELFv2 patch does not fix tests
doCheck = !(with stdenv.hostPlatform; isPower64 && isAbiElfv2);

postInstall = ''
for i in $out/libexec/valgrind/*.supp; do
Expand Down Expand Up @@ -131,7 +132,15 @@ stdenv.mkDerivation rec {
platforms = with lib.platforms; lib.intersectLists
(x86 ++ power ++ s390x ++ armv7 ++ aarch64 ++ mips)
(darwin ++ freebsd ++ illumos ++ linux);
badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
badPlatforms = with lib.systems.inspect; [
platformPatterns.isStatic
]
# We can build for PPC64 ELFv2, but analysing any PPC64 ELFv2 binary produced by Nixpkgs causes many issues: https://github.com/NixOS/nixpkgs/pull/295906
# Effectively unusable with Nixpkgs binaries
++ (map
(variant: lib.recursiveUpdate (lib.recursiveUpdate patterns.isPower64 patterns.isBigEndian) variant)
patterns.isAbiElfv2
);
broken = stdenv.isDarwin; # https://hydra.nixos.org/build/128521440/nixlog/2
};
}