diff --git a/pkgs/games/classicube/default.nix b/pkgs/games/classicube/default.nix index 06c914e56f1b..ec2490196abb 100644 --- a/pkgs/games/classicube/default.nix +++ b/pkgs/games/classicube/default.nix @@ -5,7 +5,8 @@ , makeWrapper , makeDesktopItem , copyDesktopItems -, SDL2 +, libX11 +, libXi , libGL , curl , openal @@ -14,13 +15,13 @@ stdenv.mkDerivation rec { pname = "ClassiCube"; - version = "1.3.4"; + version = "1.3.5"; src = fetchFromGitHub { owner = "UnknownShadow200"; repo = "ClassiCube"; rev = version; - sha256 = "sha256-m7pg9OL2RuCVKgFD3hMtIeY0XdJ1YviXBFVJH8/T5gI="; + sha256 = "sha256-anBi9hPwX1AAIc8dXsKyX4u7UbkKqC1P+7f7wdKWAig="; }; nativeBuildInputs = [ dos2unix makeWrapper copyDesktopItems ]; @@ -46,12 +47,8 @@ stdenv.mkDerivation rec { patches = [ # Fix hardcoded font paths ./font-location.patch - # ClassiCube doesn't compile with its X11 backend - # because of issues with libXi. - ./use-sdl.patch # For some reason, the Makefile doesn't link # with libcurl and openal when ClassiCube requires them. - # Also links with SDL2 instead of libX11 and libXi. ./fix-linking.patch ]; @@ -71,7 +68,7 @@ stdenv.mkDerivation rec { --replace 'JOBS=1' "JOBS=$NIX_BUILD_CORES" ''; - buildInputs = [ SDL2 libGL curl openal liberation_ttf ]; + buildInputs = [ libX11 libXi libGL curl openal liberation_ttf ]; preBuild = "cd src"; diff --git a/pkgs/games/classicube/fix-linking.patch b/pkgs/games/classicube/fix-linking.patch index 987c882367ee..197a3ab694e0 100644 --- a/pkgs/games/classicube/fix-linking.patch +++ b/pkgs/games/classicube/fix-linking.patch @@ -7,7 +7,7 @@ index 83188ce..3439cdb 100644 ifeq ($(PLAT),linux) -LIBS=-lX11 -lXi -lpthread -lGL -lm -ldl -+LIBS=-lSDL2 -lpthread -lGL -lm -ldl -lcurl -lopenal ++LIBS=-lX11 -lXi -lpthread -lGL -lm -ldl -lcurl -lopenal endif ifeq ($(PLAT),sunos) diff --git a/pkgs/games/classicube/use-sdl.patch b/pkgs/games/classicube/use-sdl.patch deleted file mode 100644 index 3456ef8b6469..000000000000 --- a/pkgs/games/classicube/use-sdl.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/Core.h b/src/Core.h -index e94a39e..96527d0 100644 ---- a/src/Core.h -+++ b/src/Core.h -@@ -170,7 +170,7 @@ Thus it is **NOT SAFE** to allocate a string on the stack. */ - #define CC_BUILD_LINUX - #define CC_BUILD_POSIX - #define CC_BUILD_GL --#define CC_BUILD_X11 -+#define CC_BUILD_SDL - #define CC_BUILD_CURL - #define CC_BUILD_OPENAL - #if defined CC_BUILD_RPI