From 787689860ba729fc7d2f934a706036430aea23d9 Mon Sep 17 00:00:00 2001 From: 360ied <19516527+360ied@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:32:32 -0500 Subject: [PATCH] classicube: 1.3.7 -> 1.3.8 --- pkgs/by-name/cl/classicube/fix-linking.patch | 14 ----------- pkgs/by-name/cl/classicube/package.nix | 26 +++++++++----------- 2 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 pkgs/by-name/cl/classicube/fix-linking.patch diff --git a/pkgs/by-name/cl/classicube/fix-linking.patch b/pkgs/by-name/cl/classicube/fix-linking.patch deleted file mode 100644 index a35d19caaca4..000000000000 --- a/pkgs/by-name/cl/classicube/fix-linking.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Makefile b/Makefile -index a10eb5214..70e2f720e 100644 ---- a/Makefile -+++ b/Makefile -@@ -55,7 +55,7 @@ endif - - ifeq ($(PLAT),linux) - CFLAGS += -DCC_BUILD_ICON -- LIBS = -lX11 -lXi -lpthread -lGL -ldl -+ LIBS = -lX11 -lXi -lpthread -lGL -ldl -lcurl -lopenal - BUILD_DIR = build-linux - endif - - diff --git a/pkgs/by-name/cl/classicube/package.nix b/pkgs/by-name/cl/classicube/package.nix index 4076d261d389..8caab86b7259 100644 --- a/pkgs/by-name/cl/classicube/package.nix +++ b/pkgs/by-name/cl/classicube/package.nix @@ -14,15 +14,15 @@ liberation_ttf, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ClassiCube"; - version = "1.3.7"; + version = "1.3.8"; src = fetchFromGitHub { owner = "UnknownShadow200"; repo = "ClassiCube"; - rev = version; - sha256 = "sha256-ZITyfxkQB4Jpm2ZsQyM+ouPLqCVmGB7UZRXDSU/BX0k="; + tag = finalAttrs.version; + hash = "sha256-AF4cr3ZXCixwiihS+2ayrzVH5eYShkjlfF0myb2PbHM="; }; nativeBuildInputs = [ @@ -33,8 +33,8 @@ stdenv.mkDerivation rec { desktopItems = [ (makeDesktopItem { - name = pname; - desktopName = pname; + name = finalAttrs.pname; + desktopName = finalAttrs.pname; genericName = "Sandbox Block Game"; exec = "ClassiCube"; icon = "CCicon"; @@ -52,9 +52,6 @@ stdenv.mkDerivation rec { patches = [ # Fix hardcoded font paths ./font-location.patch - # For some reason, the Makefile doesn't link - # with libcurl and openal when ClassiCube requires them. - ./fix-linking.patch ]; font_path = "${liberation_ttf}/share/fonts/truetype"; @@ -66,11 +63,12 @@ stdenv.mkDerivation rec { # This changes the hardcoded location # to the path of liberation_ttf instead substituteInPlace src/Platform_Posix.c \ - --replace '%NIXPKGS_FONT_PATH%' "${font_path}" - # ClassiCube's Makefile hardcodes JOBS=1 for some reason, - # even though it works perfectly well multi-threaded. + --replace-fail '%NIXPKGS_FONT_PATH%' "${finalAttrs.font_path}" + # For some reason, the Makefile doesn't link + # with libcurl and openal when ClassiCube requires them. substituteInPlace Makefile \ - --replace 'JOBS=1' "JOBS=$NIX_BUILD_CORES" + --replace-fail '-lX11 -lXi -lpthread -lGL -ldl -lm' \ + '-lX11 -lXi -lpthread -lGL -ldl -lm -lcurl -lopenal' ''; buildInputs = [ @@ -111,4 +109,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ _360ied ]; mainProgram = "ClassiCube"; }; -} +})