glslviewer, tab: fixup build with gcc12

This commit is contained in:
Vladimír Čunát 2023-02-08 09:20:25 +01:00
parent 6056eaaa8b
commit ef5aa34f4c
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 9 additions and 0 deletions

View file

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
sha256 = "0v7x93b61ama0gmzlx1zc56jgi7bvzsfvbkfl82xzwf2h5g1zni7";
};
postPatch = ''
sed '1i#include <cstring>' -i src/tools/text.cpp # gcc12
'';
nativeBuildInputs = [ pkg-config ensureNewerSourcesForZipFilesHook python3Packages.six ];
buildInputs = [
glfw libGLU glfw libXrandr libXdamage

View file

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-AhgWeV/ojB8jM16A5ggrOD1YjWfRVcoQbkd3S2bgdyE=";
};
# gcc12; see https://github.com/ivan-tkatchev/tab/commit/673bdac998
postPatch = ''
sed '1i#include <cstring>' -i deps.h
'';
nativeCheckInputs = [ python3 ];
doCheck = !stdenv.isDarwin;