rr: fix build with new linuxHeaders

/cc PR #194199 which updated linuxHeaders
This commit is contained in:
Vladimír Čunát 2022-10-20 18:07:15 +02:00
parent ee0190d830
commit 9cf461a645
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -1,4 +1,6 @@
{ lib, stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto }:
{ lib, stdenv, fetchFromGitHub, fetchpatch
, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto
}:
stdenv.mkDerivation rec {
version = "5.6.0";
@ -11,6 +13,14 @@ stdenv.mkDerivation rec {
sha256 = "H39HPkAQGubXVQV3jCpH4Pz+7Q9n03PrS70utk7Tt2k=";
};
patches = [
(fetchpatch {
name = "fix-flexible-array-member.patch";
url = "https://github.com/rr-debugger/rr/commit/2979c60ef8bbf7c940afd90172ddc5d8863f766e.diff";
sha256 = "cmdCJetQr3ELPOyWl37h1fGfG/xvaiJpywxIAnqb5YY=";
})
];
postPatch = ''
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
sed '7i#include <math.h>' -i src/Scheduler.cc