diff --git a/pkgs/applications/misc/xsw/default.nix b/pkgs/applications/misc/xsw/default.nix index fddaaa1652d7..6d57f49a6a30 100644 --- a/pkgs/applications/misc/xsw/default.nix +++ b/pkgs/applications/misc/xsw/default.nix @@ -39,15 +39,18 @@ stdenv.mkDerivation rec { SDL_gfx ]; - env.NIX_CFLAGS_COMPILE = toString (makeSDLFlags [ - SDL - SDL_image - SDL_ttf - SDL_gfx - ]); + env.NIX_CFLAGS_COMPILE = + toString (makeSDLFlags [ + SDL + SDL_image + SDL_ttf + SDL_gfx + ]) + + " -lSDL"; patches = [ ./parse.patch # Fixes compilation error by avoiding redundant definitions. + ./sdl-error.patch # Adds required include for SDL_GetError. ]; meta = with lib; { diff --git a/pkgs/applications/misc/xsw/sdl-error.patch b/pkgs/applications/misc/xsw/sdl-error.patch new file mode 100644 index 000000000000..83751e3cf5fc --- /dev/null +++ b/pkgs/applications/misc/xsw/sdl-error.patch @@ -0,0 +1,11 @@ +diff --git a/src/presenter.c b/src/presenter.c +index a082541..74bfbec 100644 +--- a/src/presenter.c ++++ b/src/presenter.c +@@ -5,5 +5,6 @@ + #include + #include "SDL_ttf.h" ++#include + #include "presenter.h" + #include "execute.h" + #include "list.h"