diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-04-16 16:21:25 +0100 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-04-16 18:01:40 -0300 |
commit | ec9f9bc670d71ebd15e2035fcb4259cebdaf3508 (patch) | |
tree | bc0e45db61866e50b07299ed26bbacd3480c020c /pkgs/applications/emulators | |
parent | 1eea8d509f69563b798e997f4848cf64e0db84bd (diff) |
dosbox-staging: pull upstream fixes for SDL2_net and SDL2_image headers
Without the change `dosbox-staging` fails to build as: FAILED: src/dos/libdos.a.p/program_serial.cpp.o g++ -Isrc/dos/libdos.a.p -Isrc/dos -I../src/dos -I../include -I. -I.. -Isrc/libs/ghc -I../src/libs/ghc -Isrc/libs/loguru -I../src/libs/loguru -I/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include -I/nix/store/58cdrn1birpig59wqygva9cmsnxh7wwa-SDL2-2.26.4-dev/include/SDL2 -I/nix/store/y8ab9wi9sldj6y7md833xkbppgimrs> In file included from ../src/dos/../hardware/serialport/softmodem.h:30, from ../src/dos/program_serial.cpp:27: ../src/dos/../hardware/serialport/misc_util.h:59:10: fatal error: SDL_net.h: No such file or directory 59 | #include <SDL_net.h> | ^~~~~~~~~~~
Diffstat (limited to 'pkgs/applications/emulators')
-rw-r--r-- | pkgs/applications/emulators/dosbox-staging/default.nix | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/applications/emulators/dosbox-staging/default.nix b/pkgs/applications/emulators/dosbox-staging/default.nix index 62331bd621915..e7154aa3b5a9b 100644 --- a/pkgs/applications/emulators/dosbox-staging/default.nix +++ b/pkgs/applications/emulators/dosbox-staging/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , SDL2 , SDL2_image , SDL2_net @@ -39,6 +40,25 @@ stdenv.mkDerivation (self: { hash = "sha256-I90poBeLSq1c8PXyjrx7/UcbfqFNnnNiXfJdWhLPGMc="; }; + patches = [ + # Pull missind SDL2_net dependency: + # https://github.com/dosbox-staging/dosbox-staging/pull/2358 + (fetchpatch { + name = "sdl2-net.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/1b02f187a39263f4b0285323dcfe184bccd749c2.patch"; + hash = "sha256-Ev97xApInu6r5wvI9Q7FhkSXqtMW/rwJj48fExvqnT0="; + }) + + # Pull missing SDL2_image dependency: + # https://github.com/dosbox-staging/dosbox-staging/pull/2239 + (fetchpatch { + name = "sdl2-image.patch"; + url = "https://github.com/dosbox-staging/dosbox-staging/commit/ca8b7a906d29a3f8ce956c4af7dc829a6ac3e229.patch"; + hash = "sha256-WtTVSWWSlfXrdPVsnlDe4P5K/Fnj4QsOzx3Wo/Kusmg="; + includes = [ "src/gui/meson.build" ]; + }) + ]; + nativeBuildInputs = [ copyDesktopItems gtest @@ -69,11 +89,6 @@ stdenv.mkDerivation (self: { speexdsp ]; - env.NIX_CFLAGS_COMPILE = toString [ - "-I${SDL2_image}/include/SDL2" - "-I${SDL2_net}/include/SDL2" - ]; - desktopItems = [ (makeDesktopItem { name = "dosbox-staging"; |