lyx, rr, linuxPackgaes.systemtap: fixup build with gcc12

This commit is contained in:
Vladimír Čunát 2023-01-31 12:07:39 +01:00
parent b3195fa1af
commit 6930b5bda8
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
3 changed files with 8 additions and 0 deletions

View file

@ -11,6 +11,12 @@ mkDerivation rec {
sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng=";
};
# Needed with GCC 12
postPatch = ''
sed '1i#include <iterator>' -i src/lyxfind.cpp
sed '1i#include <cstring>' -i src/insets/InsetListings.cpp
'';
# LaTeX is used from $PATH, as people often want to have it with extra pkgs
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [

View file

@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
sed '7i#include <math.h>' -i src/Scheduler.cc
sed '1i#include <ctime>' -i src/test-monitor/test-monitor.cc
patchShebangs .
'';

View file

@ -19,6 +19,7 @@ let
nativeBuildInputs = [ pkg-config cpio python3 python3.pkgs.setuptools ];
buildInputs = [ elfutils gettext ];
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12
};
## a kernel build dir as expected by systemtap