classicube: 1.3.7 -> 1.3.8 (#491622)

This commit is contained in:
Gaétan Lepage
2026-03-07 22:22:15 +00:00
committed by GitHub
2 changed files with 12 additions and 28 deletions
@@ -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
+12 -14
View File
@@ -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";
};
}
})