From 81fdbaa33ec17ef361f17d165c82afac295a2c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 7 Mar 2025 21:07:47 +0100 Subject: [PATCH 01/19] ioquake3: Fix build on darwin --- pkgs/by-name/io/ioquake3/package.nix | 48 ++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/io/ioquake3/package.nix b/pkgs/by-name/io/ioquake3/package.nix index d039a6a5014a..9d582e16823c 100644 --- a/pkgs/by-name/io/ioquake3/package.nix +++ b/pkgs/by-name/io/ioquake3/package.nix @@ -19,6 +19,7 @@ freetype, mumble, unstableGitUpdater, + bc, }: stdenv.mkDerivation { @@ -37,6 +38,7 @@ stdenv.mkDerivation { makeBinaryWrapper pkg-config which + bc ]; buildInputs = [ @@ -59,16 +61,50 @@ stdenv.mkDerivation { cp ${./Makefile.local} ./Makefile.local ''; + preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace Makefile \ + --replace-fail \ + "-I/Library/Frameworks/SDL2.framework/Headers" \ + "-I${lib.getDev SDL2}/include/SDL2" \ + --replace-fail \ + "CLIENT_LIBS += -framework SDL2" \ + "CLIENT_LIBS += -L${lib.getLib SDL2}/lib -lSDL2" \ + --replace-fail \ + "RENDERER_LIBS += -framework SDL2" \ + "RENDERER_LIBS += -L${lib.getLib SDL2}/lib -lSDL2" \ + --replace-fail \ + "-I/System/Library/Frameworks/OpenAL.framework/Headers" \ + "-I${lib.getDev openal}/include/AL" \ + --replace-fail \ + "CLIENT_LIBS += -framework OpenAL" \ + "CLIENT_LIBS += -L${lib.getLib openal}/lib -lopenal" \ + --replace-fail \ + "TOOLS_CC = gcc" \ + "TOOLS_CC = clang" + ''; + + postBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' + echo "Building Application Bundle for Darwin / macOS" + # The following script works without extensive patching (see preBuild), as the regular buil already + # built all the c code and libraries. + ./make-macosx.sh ${stdenv.hostPlatform.darwinArch} + ''; + installTargets = [ "copyfiles" ]; installFlags = [ "COPYDIR=$(out)/share/ioquake3" ]; - postInstall = '' - install -Dm644 misc/quake3.svg $out/share/icons/hicolor/scalable/apps/ioquake3.svg + postInstall = + '' + install -Dm644 misc/quake3.svg $out/share/icons/hicolor/scalable/apps/ioquake3.svg - makeWrapper $out/share/ioquake3/ioquake3.* $out/bin/ioquake3 - makeWrapper $out/share/ioquake3/ioq3ded.* $out/bin/ioq3ded - ''; + makeWrapper $out/share/ioquake3/ioquake3.* $out/bin/ioquake3 + makeWrapper $out/share/ioquake3/ioq3ded.* $out/bin/ioq3ded + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p $out/Applications + mv build/release-darwin-${stdenv.hostPlatform.darwinArch}/ioquake3.app $out/Applications/ + ''; desktopItems = [ (makeDesktopItem { @@ -96,6 +132,6 @@ stdenv.mkDerivation { drupol rvolosatovs ]; - platforms = lib.platforms.linux; + platforms = lib.platforms.unix; }; } From d13d965aa0a0ce5aab3bac56e86aaa1643b05a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Thu, 20 Mar 2025 20:19:42 +0100 Subject: [PATCH 02/19] ioquake3: reuse description --- pkgs/by-name/io/ioquake3/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/io/ioquake3/package.nix b/pkgs/by-name/io/ioquake3/package.nix index 9d582e16823c..a28fccee5f32 100644 --- a/pkgs/by-name/io/ioquake3/package.nix +++ b/pkgs/by-name/io/ioquake3/package.nix @@ -22,7 +22,7 @@ bc, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "ioquake3"; version = "0-unstable-2025-05-15"; @@ -111,7 +111,7 @@ stdenv.mkDerivation { name = "IOQuake3"; exec = "ioquake3"; icon = "ioquake3"; - comment = "A fast-paced 3D first-person shooter, a community effort to continue supporting/developing id's Quake III Arena"; + comment = finalAttrs.meta.description; desktopName = "ioquake3"; categories = [ "Game" @@ -134,4 +134,4 @@ stdenv.mkDerivation { ]; platforms = lib.platforms.unix; }; -} +}) From 0ecd50f8f1ba5581293ba92e35ae9f481ef4670e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Sun, 9 Mar 2025 21:48:57 +0100 Subject: [PATCH 03/19] quake3-wrapper: Fix build on darwin --- pkgs/games/quake3/wrapper/default.nix | 40 +++++++++++++++++++-------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index 15be84199b66..811ea48e67a6 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -29,19 +29,37 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper ]; - buildCommand = '' - mkdir -p $out/bin + buildCommand = + lib.optionalString stdenv.hostPlatform.isLinux '' + mkdir -p $out/bin - # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback - # software rendering. GCC is needed so that libgcc_s.so can be found - # when Mesa is used. - makeWrapper ${env}/bin/ioquake3* $out/bin/quake3 \ - --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \ - --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1" + # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback + # software rendering. GCC is needed so that libgcc_s.so can be found + # when Mesa is used. + makeWrapper ${env}/bin/ioquake3* $out/bin/quake3 \ + --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \ + --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1" - makeWrapper ${env}/bin/ioq3ded* $out/bin/quake3-server \ - --add-flags "+set fs_basepath ${env}" - ''; + makeWrapper ${env}/bin/ioq3ded* $out/bin/quake3-server \ + --add-flags "+set fs_basepath ${env}" + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p $out/Applications $out/bin + makeWrapper ${env}/bin/ioquake3* $out/bin/ioquake3 \ + --add-flags "+set fs_basepath ${env}" + makeWrapper ${env}/bin/ioq3ded* $out/bin/ioq3ded \ + --add-flags "+set fs_basepath ${env}" + + # Renaming application packages on darwin is not quite as simple as they internally + # refer to the old name in many places. So we shelve that for now. + cp -RL ${env}/Applications/ioquake3.app $out/Applications/ + chmod -R +w $out/Applications/ + + wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioquake3 \ + --add-flags "+set fs_basepath ${env}" + wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioq3ded \ + --add-flags "+set fs_basepath ${env}" + ''; meta = { inherit description; From 1fad2b71e8e068c8dd9369609035fcd2cf1ab293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Mon, 10 Mar 2025 11:55:24 +0100 Subject: [PATCH 04/19] quake3-hires: Add more high resolution enhancements for quake Also build a derivation that packs it all together --- pkgs/games/quake3/content/hires.nix | 45 ++++++++++++++++++++++++++++- pkgs/top-level/all-packages.nix | 10 +++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index 2195e4131352..6e799c46979a 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -2,21 +2,64 @@ stdenv, lib, fetchzip, + fetchurl, + libarchive, }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "quake3hires"; version = "2020-01-20"; # Unknown version, used the date of web.archive.org capture. + nativeBuildInputs = [ + libarchive + ]; + src = fetchzip { url = "https://web.archive.org/web/20200120024216/http://ioquake3.org/files/xcsv_hires.zip"; sha256 = "09vhrray8mh1ic2qgcwv0zlmsnz789y32dkkvrz1vdki4yqkf717"; stripRoot = false; }; + # https://www.moddb.com/mods/high-quality-quake + # TODO check if that file needs renaming to something that starts with z_* so it actually overrides anything in pak0.pk3 + extra-pack-resolution = fetchurl { + # url = "https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/extra-pack-resolution.pk3"; + url = "https://web.archive.org/web/20250310093216/https://fmt3.dl.dbolical.com/dl/2018/11/06/q3a-hqq-v37.zip?st=0XzNnNvOYWrJAi_6AB3mKw==&e=1741602736"; + sha256 = "sha256-0nAXkrf4ahlct75TgO18PjuT9IkH8fpDhtTflJfPpPM="; + }; + + # backport of sound files from quake 3 live + quake3-live-sounds = fetchurl { + url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/quake3-live-sounds.pk3"; + sha256 = "sha256-0vODIpA3/5BPNno5PKhc/ISI2rFYXYyumKdzUFyXn3M="; + }; + # https://www.moddb.com/mods/cz45modbundle/addons/cz45-q3a-weapon-model-remake-v10 + # https://www.moddb.com/downloads/mirror/255463/130/9de70b5dc7ebb1baa44acf91458b04f9/ + # this is only part of the mod, only the weapons skins + # url = "https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/hd-weapons.pk3"; + hd-weapons = fetchurl { + name = "czq3hdweaprem_v10.zip"; + url = "https://web.archive.org/web/20250310101737/https://fmt1.dl.dbolical.com/dl/2023/08/13/czq3hdweaprem_v10.zip?st=XBoRCpVmvTYtc60xxi36VQ==&e=1741605457"; + sha256 = "sha256-pL7MsEFsKJV+a+z45Ns16SPdQB3i2D6T3x7tBqWtm1s="; + }; + zpack-weapons = fetchurl { + url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/zpack-weapons.pk3"; + sha256 = "sha256-RSK0wZvNqrC3lTT6jhSmEgGL6TiaFz+f+YoI7lr7ckA="; + }; + buildCommand = '' mkdir -p $out/baseq3 install -Dm444 $src/xcsv_bq3hi-res.pk3 $out/baseq3/xcsv_bq3hi-res.pk3 + install -Dm444 ${extra-pack-resolution} $out/baseq3/pak9hqq37test20181106.pk3 + install -Dm444 ${quake3-live-sounds} $out/baseq3/quake3-live-sounds.pk3 + + bsdunzip ${hd-weapons} + install -Dm444 zzczhdwr1.pk3 $out/baseq3/zzczhdwr1.pk3 + # https://github.com/diegoulloao/ioquake3-mac-install takes only the first file, following his lead for now + # install -Dm444 zzczhdwr2.pk3 $out/baseq3/zzczhdwr2.pk3 + # install -Dm444 zzczhdwr3.pk3 $out/baseq3/zzczhdwr3.pk3 + + install -Dm444 ${zpack-weapons} $out/baseq3/zpack-weapons.pk3 ''; preferLocalBuild = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 339dc8a399fe..4253990ff2c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15184,6 +15184,16 @@ with pkgs; ]; }; + quake3demo-hires = quake3wrapper { + name = "quake3-demo-${lib.getVersion quake3demodata}"; + description = "Demo of Quake 3 Arena, a classic first-person shooter"; + paks = [ + quake3pointrelease + quake3demodata + quake3hires + ]; + }; + quake3demodata = callPackage ../games/quake3/content/demo.nix { }; quake3pointrelease = callPackage ../games/quake3/content/pointrelease.nix { }; From 11b1c3aec5b065b3da5ddbfa02a26e230f118313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Thu, 20 Mar 2025 20:26:06 +0100 Subject: [PATCH 05/19] quake3-hires: switch from rec to fixpoint --- pkgs/games/quake3/content/hires.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index 6e799c46979a..0714a1063cf9 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -6,7 +6,7 @@ libarchive, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "quake3hires"; version = "2020-01-20"; # Unknown version, used the date of web.archive.org capture. @@ -50,16 +50,16 @@ stdenv.mkDerivation rec { buildCommand = '' mkdir -p $out/baseq3 install -Dm444 $src/xcsv_bq3hi-res.pk3 $out/baseq3/xcsv_bq3hi-res.pk3 - install -Dm444 ${extra-pack-resolution} $out/baseq3/pak9hqq37test20181106.pk3 - install -Dm444 ${quake3-live-sounds} $out/baseq3/quake3-live-sounds.pk3 + install -Dm444 ${finalAttrs.extra-pack-resolution} $out/baseq3/pak9hqq37test20181106.pk3 + install -Dm444 ${finalAttrs.quake3-live-sounds} $out/baseq3/quake3-live-sounds.pk3 - bsdunzip ${hd-weapons} + bsdunzip ${finalAttrs.hd-weapons} install -Dm444 zzczhdwr1.pk3 $out/baseq3/zzczhdwr1.pk3 # https://github.com/diegoulloao/ioquake3-mac-install takes only the first file, following his lead for now # install -Dm444 zzczhdwr2.pk3 $out/baseq3/zzczhdwr2.pk3 # install -Dm444 zzczhdwr3.pk3 $out/baseq3/zzczhdwr3.pk3 - install -Dm444 ${zpack-weapons} $out/baseq3/zpack-weapons.pk3 + install -Dm444 ${finalAttrs.zpack-weapons} $out/baseq3/zpack-weapons.pk3 ''; preferLocalBuild = true; @@ -70,4 +70,4 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ rvolosatovs ]; }; -} +}) From ff0ec8e6a15e3b323ce7ab6ab60b26f97e7741b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Thu, 20 Mar 2025 20:27:08 +0100 Subject: [PATCH 06/19] quake3-hires: annotate version to note that this is an unstable version Basically, we use the tip of the tree as upstream has not done propper releases in a long time. --- pkgs/games/quake3/content/hires.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index 0714a1063cf9..2685fe5985c8 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "quake3hires"; - version = "2020-01-20"; # Unknown version, used the date of web.archive.org capture. + version = "unstable-2020-01-20"; # Unknown version, used the date of web.archive.org capture. nativeBuildInputs = [ libarchive From fbf8c9ff59e70d5c12ca99a94d33861b838228d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Thu, 20 Mar 2025 20:27:52 +0100 Subject: [PATCH 07/19] quake3: stop using star matches, as there is nothing to match --- pkgs/games/quake3/wrapper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index 811ea48e67a6..8fb2fbc4dda9 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -45,9 +45,9 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications $out/bin - makeWrapper ${env}/bin/ioquake3* $out/bin/ioquake3 \ + makeWrapper ${env}/bin/ioquake3 $out/bin/ioquake3 \ --add-flags "+set fs_basepath ${env}" - makeWrapper ${env}/bin/ioq3ded* $out/bin/ioq3ded \ + makeWrapper ${env}/bin/ioq3ded $out/bin/ioq3ded \ --add-flags "+set fs_basepath ${env}" # Renaming application packages on darwin is not quite as simple as they internally From 4954fc6bb1991623f37ca9ac62256e82e11f395d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 21 Mar 2025 21:36:35 +0100 Subject: [PATCH 08/19] quake3: name outputs from pname for consistently named binaries --- pkgs/games/quake3/wrapper/default.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index 8fb2fbc4dda9..ea7475f8b6bd 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -10,6 +10,8 @@ { paks, name ? (lib.head paks).name, + pname ? (lib.head paks).pname, + version ? (lib.head paks).version, description ? "", }: @@ -36,18 +38,18 @@ stdenv.mkDerivation { # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback # software rendering. GCC is needed so that libgcc_s.so can be found # when Mesa is used. - makeWrapper ${env}/bin/ioquake3* $out/bin/quake3 \ + makeWrapper ${env}/bin/ioquake3* $out/bin/${pname} \ --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \ --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1" - makeWrapper ${env}/bin/ioq3ded* $out/bin/quake3-server \ + makeWrapper ${env}/bin/ioq3ded* $out/bin/${pname}-server \ --add-flags "+set fs_basepath ${env}" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications $out/bin - makeWrapper ${env}/bin/ioquake3 $out/bin/ioquake3 \ + makeWrapper ${env}/bin/ioquake3 $out/bin/${pname} \ --add-flags "+set fs_basepath ${env}" - makeWrapper ${env}/bin/ioq3ded $out/bin/ioq3ded \ + makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \ --add-flags "+set fs_basepath ${env}" # Renaming application packages on darwin is not quite as simple as they internally diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4253990ff2c6..ab8bf52944fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15177,6 +15177,7 @@ with pkgs; quake3demo = quake3wrapper { name = "quake3-demo-${lib.getVersion quake3demodata}"; + pname = "quake3-demo"; description = "Demo of Quake 3 Arena, a classic first-person shooter"; paks = [ quake3pointrelease From d73f395319139963e347933e4d848d92686b599e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 21 Mar 2025 12:12:25 +0100 Subject: [PATCH 09/19] quake3: extract basepath into variable to remove duplication --- pkgs/games/quake3/wrapper/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index ea7475f8b6bd..ba76050f97fd 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -32,25 +32,28 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper ]; buildCommand = + let + setBasepath = "+set fs_basepath ${env}"; + in lib.optionalString stdenv.hostPlatform.isLinux '' mkdir -p $out/bin # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback # software rendering. GCC is needed so that libgcc_s.so can be found # when Mesa is used. - makeWrapper ${env}/bin/ioquake3* $out/bin/${pname} \ + makeWrapper ${env}/bin/ioquake3 $out/bin/${pname} \ --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \ - --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1" + --add-flags "${setBasepath} +set r_allowSoftwareGL 1" - makeWrapper ${env}/bin/ioq3ded* $out/bin/${pname}-server \ - --add-flags "+set fs_basepath ${env}" + makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \ + --add-flags "${setBasepath}" '' + lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications $out/bin makeWrapper ${env}/bin/ioquake3 $out/bin/${pname} \ - --add-flags "+set fs_basepath ${env}" + --add-flags "${setBasepath}" makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \ - --add-flags "+set fs_basepath ${env}" + --add-flags "${setBasepath}" # Renaming application packages on darwin is not quite as simple as they internally # refer to the old name in many places. So we shelve that for now. @@ -58,9 +61,9 @@ stdenv.mkDerivation { chmod -R +w $out/Applications/ wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioquake3 \ - --add-flags "+set fs_basepath ${env}" + --add-flags "${setBasepath}" wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioq3ded \ - --add-flags "+set fs_basepath ${env}" + --add-flags "${setBasepath}" ''; meta = { From 2e74aafeb6b9682877c218d6eed52c0c26c21131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 21 Mar 2025 21:21:32 +0100 Subject: [PATCH 10/19] quake3: rename the darwin wrapper for consistency --- pkgs/games/quake3/wrapper/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index ba76050f97fd..7c9ed86f9f31 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -55,14 +55,12 @@ stdenv.mkDerivation { makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \ --add-flags "${setBasepath}" - # Renaming application packages on darwin is not quite as simple as they internally - # refer to the old name in many places. So we shelve that for now. - cp -RL ${env}/Applications/ioquake3.app $out/Applications/ + cp -RL ${env}/Applications/ioquake3.app/ $out/Applications/${pname}.app chmod -R +w $out/Applications/ - wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioquake3 \ + wrapProgram $out/Applications/${pname}.app/Contents/MacOS/ioquake3 \ --add-flags "${setBasepath}" - wrapProgram $out/Applications/ioquake3.app/Contents/MacOS/ioq3ded \ + wrapProgram $out/Applications/${pname}.app/Contents/MacOS/ioq3ded \ --add-flags "${setBasepath}" ''; From 1824b615d147cf14fd95b8ff6db71890f55cc710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 21 Mar 2025 21:26:30 +0100 Subject: [PATCH 11/19] quake3: Inherit wrapper attributes from ioquake3 and the used pak file This makes it much shorter to use, as the first set of pak files can provide the description, and the used ioquake3 can provide the supported platforms. --- pkgs/games/quake3/content/demo.nix | 14 +++++++++++++- pkgs/games/quake3/wrapper/default.nix | 12 +++++++++--- pkgs/top-level/all-packages.nix | 5 +++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pkgs/games/quake3/content/demo.nix b/pkgs/games/quake3/content/demo.nix index 9b3b4d06245b..678f582bb3b9 100644 --- a/pkgs/games/quake3/content/demo.nix +++ b/pkgs/games/quake3/content/demo.nix @@ -26,7 +26,19 @@ stdenv.mkDerivation { preferLocalBuild = true; meta = with lib; { - description = "Quake 3 Arena demo content"; + description = "Demo of Quake 3 Arena, a classic first-person shooter"; + longDescription = '' + Quake III Arena and it's demo don't offer current wide screen resolutions in the menu. + + To switch to such a resolution, you will have to enter something like this in the quake console (invoke with ~ by default) + + r_mode -1; r_customwidth 1920; r_customheight 1080; r_fullscreen 1; vid_restart + + Or call the quake commandline with these parameters + + $ quake3 +set r_mode -1 +set r_customwidth 1920 +set r_customheight 1080 +set r_fullscreen 1 +vid_restart + ''; + homepage = "https://www.idsoftware.com/"; license = licenses.unfreeRedistributable; platforms = platforms.all; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index 7c9ed86f9f31..ce29fcbb9729 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -9,7 +9,6 @@ { paks, - name ? (lib.head paks).name, pname ? (lib.head paks).pname, version ? (lib.head paks).version, description ? "", @@ -27,7 +26,8 @@ let in stdenv.mkDerivation { - name = "${name}-${ioquake3.name}"; + pname = "${pname}-${ioquake3.name}"; + inherit version; nativeBuildInputs = [ makeWrapper ]; @@ -65,6 +65,12 @@ stdenv.mkDerivation { ''; meta = { - inherit description; + inherit ((lib.head paks).meta) + description + longDescription + homepage + license + ; + inherit (ioquake3.meta) platforms; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ab8bf52944fc..82c84d5f22e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15176,11 +15176,12 @@ with pkgs; quake3wrapper = callPackage ../games/quake3/wrapper { }; quake3demo = quake3wrapper { - name = "quake3-demo-${lib.getVersion quake3demodata}"; pname = "quake3-demo"; - description = "Demo of Quake 3 Arena, a classic first-person shooter"; paks = [ + quake3demodata quake3pointrelease + ]; + }; quake3demodata ]; }; From 9104fce8d6aa751834940205b5ff640a7b9e13ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Thu, 20 Mar 2025 20:52:40 +0100 Subject: [PATCH 12/19] quake3-hires: only set pname and leave the rest to the wrapper --- pkgs/top-level/all-packages.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82c84d5f22e6..e58f533eb780 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15182,20 +15182,16 @@ with pkgs; quake3pointrelease ]; }; - quake3demodata - ]; - }; - quake3demo-hires = quake3wrapper { - name = "quake3-demo-${lib.getVersion quake3demodata}"; - description = "Demo of Quake 3 Arena, a classic first-person shooter"; + pname = "quake3-demo"; paks = [ - quake3pointrelease quake3demodata + quake3pointrelease quake3hires ]; }; + quake3demodata = callPackage ../games/quake3/content/demo.nix { }; quake3pointrelease = callPackage ../games/quake3/content/pointrelease.nix { }; From f59281f1c7c35de4a6ba0f02a45df560ad62e3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 21 Mar 2025 21:28:36 +0100 Subject: [PATCH 13/19] quake3-arena: add full game with dependency on externally provided pak0.pk3 --- pkgs/games/quake3/content/arena.nix | 65 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 19 +++++++++ 2 files changed, 84 insertions(+) create mode 100644 pkgs/games/quake3/content/arena.nix diff --git a/pkgs/games/quake3/content/arena.nix b/pkgs/games/quake3/content/arena.nix new file mode 100644 index 000000000000..1f1ea545fb9d --- /dev/null +++ b/pkgs/games/quake3/content/arena.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + fetchzip, + requireFile, +}: + +let + version = "1.32c"; +in +stdenv.mkDerivation (finalAttrs: { + pname = "quake3arenadata"; + inherit version; + + src = requireFile rec { + name = "pak0.pk3"; + hash = "sha256-fOizkQYgzVCgnk8RAPQm6MYYD2iJXVifgOa9la9UvK4="; + message = '' + Quake 3 Arena requires the original ${name} file, from any legal source of the game. + + This could be an old CD-ROM you have lying around or you can try to buy the game. + + To my knowledge the Steam Quake-Collection-Package, is about the last legal way to get it. + + Please note, there are plenty of versions of this file online like: + + - https://github.com/nrempel/q3-server/raw/master/baseq3/pak0.pk3 + - https://archive.org/details/quake-3-arena + + However, none of these have the blessing of ID-Software and thus do not qualify. + + Once you download a version or checked your old CD-ROM, locate the ${name} file + inside the baseq3 folder and then run the following command on it: + + nix-prefetch-url file:///path/to/baseq3/${name} + ''; + }; + + buildCommand = '' + mkdir -p $out/baseq3 + echo 'wwwwwwwwwwwwwwww' > $out/baseq3/q3key + ln -s $src $out/baseq3/pak0.pk3 + ''; + + preferLocalBuild = true; + + meta = { + description = "Quake 3 Arena content"; + longDescription = '' + Quake III Arena and it's demo don't offer current wide screen resolutions in the menu. + + To switch to such a resolution, you will have to enter something like this in the quake console (invoke with ~ by default) + + r_mode -1; r_customwidth 1920; r_customheight 1080; r_fullscreen 1; vid_restart + + Or call the quake commandline with these parameters + + $ +set r_mode -1 +set r_customwidth 1920 +set r_customheight 1080 +set r_fullscreen 1 +vid_restart + ''; + homepage = "https://www.idsoftware.com/"; + license = lib.licenses.unfreeRedistributable; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ abbradar ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e58f533eb780..2cf229441208 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15175,6 +15175,23 @@ with pkgs; quake3wrapper = callPackage ../games/quake3/wrapper { }; + quake3arena = quake3wrapper { + pname = "quake3"; + paks = [ + quake3arenadata + quake3pointrelease + ]; + }; + + quake3arena-hires = quake3wrapper { + pname = "quake3"; + paks = [ + quake3arenadata + quake3pointrelease + quake3hires + ]; + }; + quake3demo = quake3wrapper { pname = "quake3-demo"; paks = [ @@ -15182,6 +15199,7 @@ with pkgs; quake3pointrelease ]; }; + quake3demo-hires = quake3wrapper { pname = "quake3-demo"; paks = [ @@ -15191,6 +15209,7 @@ with pkgs; ]; }; + quake3arenadata = callPackage ../games/quake3/content/arena.nix { }; quake3demodata = callPackage ../games/quake3/content/demo.nix { }; From c89d34d7728b0d89778f390cc09c15b3b9b51c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Sat, 22 Mar 2025 09:05:06 +0100 Subject: [PATCH 14/19] quake3: move all the files into a set to make visible that they belong together This also neatly avoids the warning by nipkgs-vet --- pkgs/games/quake3/default.nix | 46 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 54 +++++++-------------------------- 2 files changed, 57 insertions(+), 43 deletions(-) create mode 100644 pkgs/games/quake3/default.nix diff --git a/pkgs/games/quake3/default.nix b/pkgs/games/quake3/default.nix new file mode 100644 index 000000000000..62f1dc055678 --- /dev/null +++ b/pkgs/games/quake3/default.nix @@ -0,0 +1,46 @@ +callPackage: rec { + # main entry point to create a runnable quake3 + quake3wrapper = callPackage ./wrapper { }; + + # data files + quake3arenadata = callPackage ./content/arena.nix { }; + quake3demodata = callPackage ./content/demo.nix { }; + quake3pointrelease = callPackage ./content/pointrelease.nix { }; + quake3hires = callPackage ./content/hires.nix { }; + + # runnable quakes with different configurations / mods + + quake3arena = quake3wrapper { + pname = "quake3"; + paks = [ + quake3arenadata + quake3pointrelease + ]; + }; + + quake3arena-hires = quake3wrapper { + pname = "quake3"; + paks = [ + quake3arenadata + quake3pointrelease + quake3hires + ]; + }; + + quake3demo = quake3wrapper { + pname = "quake3-demo"; + paks = [ + quake3demodata + quake3pointrelease + ]; + }; + + quake3demo-hires = quake3wrapper { + pname = "quake3-demo"; + paks = [ + quake3demodata + quake3pointrelease + quake3hires + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2cf229441208..8d43eab9139b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15173,49 +15173,17 @@ with pkgs; protobuf = protobuf_21; }; - quake3wrapper = callPackage ../games/quake3/wrapper { }; - - quake3arena = quake3wrapper { - pname = "quake3"; - paks = [ - quake3arenadata - quake3pointrelease - ]; - }; - - quake3arena-hires = quake3wrapper { - pname = "quake3"; - paks = [ - quake3arenadata - quake3pointrelease - quake3hires - ]; - }; - - quake3demo = quake3wrapper { - pname = "quake3-demo"; - paks = [ - quake3demodata - quake3pointrelease - ]; - }; - - quake3demo-hires = quake3wrapper { - pname = "quake3-demo"; - paks = [ - quake3demodata - quake3pointrelease - quake3hires - ]; - }; - - quake3arenadata = callPackage ../games/quake3/content/arena.nix { }; - - quake3demodata = callPackage ../games/quake3/content/demo.nix { }; - - quake3pointrelease = callPackage ../games/quake3/content/pointrelease.nix { }; - - quake3hires = callPackage ../games/quake3/content/hires.nix { }; + inherit (import ../games/quake3 pkgs.callPackage) + quake3wrapper + quake3arenadata + quake3demodata + quake3pointrelease + quake3arena + quake3arena-hires + quake3demo + quake3demo-hires + quake3hires + ; quakespasm = callPackage ../games/quakespasm { }; vkquake = callPackage ../games/quakespasm/vulkan.nix { }; From dd50a04913a949055d4a6bc59e7b2007629fc127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Sun, 23 Mar 2025 13:11:47 +0100 Subject: [PATCH 15/19] quake3-hires: switch from deprecated sha256 attribute --- pkgs/games/quake3/content/hires.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index 2685fe5985c8..551e22d1b7d1 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -25,13 +25,13 @@ stdenv.mkDerivation (finalAttrs: { extra-pack-resolution = fetchurl { # url = "https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/extra-pack-resolution.pk3"; url = "https://web.archive.org/web/20250310093216/https://fmt3.dl.dbolical.com/dl/2018/11/06/q3a-hqq-v37.zip?st=0XzNnNvOYWrJAi_6AB3mKw==&e=1741602736"; - sha256 = "sha256-0nAXkrf4ahlct75TgO18PjuT9IkH8fpDhtTflJfPpPM="; + hash = "sha256-0nAXkrf4ahlct75TgO18PjuT9IkH8fpDhtTflJfPpPM="; }; # backport of sound files from quake 3 live quake3-live-sounds = fetchurl { url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/quake3-live-sounds.pk3"; - sha256 = "sha256-0vODIpA3/5BPNno5PKhc/ISI2rFYXYyumKdzUFyXn3M="; + hash = "sha256-kdHP6lNMuq5+OfWQuxgeVPijYEm8JcZveAzZDoYCrc4="; }; # https://www.moddb.com/mods/cz45modbundle/addons/cz45-q3a-weapon-model-remake-v10 # https://www.moddb.com/downloads/mirror/255463/130/9de70b5dc7ebb1baa44acf91458b04f9/ @@ -40,11 +40,11 @@ stdenv.mkDerivation (finalAttrs: { hd-weapons = fetchurl { name = "czq3hdweaprem_v10.zip"; url = "https://web.archive.org/web/20250310101737/https://fmt1.dl.dbolical.com/dl/2023/08/13/czq3hdweaprem_v10.zip?st=XBoRCpVmvTYtc60xxi36VQ==&e=1741605457"; - sha256 = "sha256-pL7MsEFsKJV+a+z45Ns16SPdQB3i2D6T3x7tBqWtm1s="; + hash = "sha256-pL7MsEFsKJV+a+z45Ns16SPdQB3i2D6T3x7tBqWtm1s="; }; zpack-weapons = fetchurl { url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/zpack-weapons.pk3"; - sha256 = "sha256-RSK0wZvNqrC3lTT6jhSmEgGL6TiaFz+f+YoI7lr7ckA="; + hash = "sha256-RG9pgJc8BHB9sfkmMQI3bEzAf+xO0HPD2bxJ9CxRtek"; }; buildCommand = '' From a5b5293befb856f6eb68d23e635b89f61806febd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Sun, 13 Apr 2025 13:49:09 +0200 Subject: [PATCH 16/19] quake3-hires: Better way to download github sources Before github would randomly change somethign about the files making their checksums invalid. This should work better. --- pkgs/games/quake3/content/hires.nix | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index 551e22d1b7d1..e207d23d919e 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -3,6 +3,7 @@ lib, fetchzip, fetchurl, + fetchFromGitHub, libarchive, }: @@ -23,16 +24,9 @@ stdenv.mkDerivation (finalAttrs: { # https://www.moddb.com/mods/high-quality-quake # TODO check if that file needs renaming to something that starts with z_* so it actually overrides anything in pak0.pk3 extra-pack-resolution = fetchurl { - # url = "https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/extra-pack-resolution.pk3"; url = "https://web.archive.org/web/20250310093216/https://fmt3.dl.dbolical.com/dl/2018/11/06/q3a-hqq-v37.zip?st=0XzNnNvOYWrJAi_6AB3mKw==&e=1741602736"; hash = "sha256-0nAXkrf4ahlct75TgO18PjuT9IkH8fpDhtTflJfPpPM="; }; - - # backport of sound files from quake 3 live - quake3-live-sounds = fetchurl { - url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/quake3-live-sounds.pk3"; - hash = "sha256-kdHP6lNMuq5+OfWQuxgeVPijYEm8JcZveAzZDoYCrc4="; - }; # https://www.moddb.com/mods/cz45modbundle/addons/cz45-q3a-weapon-model-remake-v10 # https://www.moddb.com/downloads/mirror/255463/130/9de70b5dc7ebb1baa44acf91458b04f9/ # this is only part of the mod, only the weapons skins @@ -42,16 +36,20 @@ stdenv.mkDerivation (finalAttrs: { url = "https://web.archive.org/web/20250310101737/https://fmt1.dl.dbolical.com/dl/2023/08/13/czq3hdweaprem_v10.zip?st=XBoRCpVmvTYtc60xxi36VQ==&e=1741605457"; hash = "sha256-pL7MsEFsKJV+a+z45Ns16SPdQB3i2D6T3x7tBqWtm1s="; }; - zpack-weapons = fetchurl { - url = "https://github.com/diegoulloao/ioquake3-mac-install/blob/3a767ff0131742ec517fd5f13ddca16dee91927d/extras/zpack-weapons.pk3"; - hash = "sha256-RG9pgJc8BHB9sfkmMQI3bEzAf+xO0HPD2bxJ9CxRtek"; + + # I would like to find the original sources of the quake3-live-sounds.pk3 and zpack-weapons.pk3 files + # Any hints are welcome + ioquake3_mac = fetchFromGitHub { + owner = "diegoulloao"; + repo = "ioquake3-mac-install"; + rev = "3a767ff0131742ec517fd5f13ddca16dee91927d"; + hash = "sha256-uY3pybCnQ7lZatP3s9AiT779/4xj8N3R4qx8V6991aM="; }; buildCommand = '' mkdir -p $out/baseq3 install -Dm444 $src/xcsv_bq3hi-res.pk3 $out/baseq3/xcsv_bq3hi-res.pk3 install -Dm444 ${finalAttrs.extra-pack-resolution} $out/baseq3/pak9hqq37test20181106.pk3 - install -Dm444 ${finalAttrs.quake3-live-sounds} $out/baseq3/quake3-live-sounds.pk3 bsdunzip ${finalAttrs.hd-weapons} install -Dm444 zzczhdwr1.pk3 $out/baseq3/zzczhdwr1.pk3 @@ -59,7 +57,8 @@ stdenv.mkDerivation (finalAttrs: { # install -Dm444 zzczhdwr2.pk3 $out/baseq3/zzczhdwr2.pk3 # install -Dm444 zzczhdwr3.pk3 $out/baseq3/zzczhdwr3.pk3 - install -Dm444 ${finalAttrs.zpack-weapons} $out/baseq3/zpack-weapons.pk3 + install -Dm444 ${finalAttrs.ioquake3_mac}/extras/quake3-live-sounds.pk3 $out/baseq3/quake3-live-sounds.pk3 + install -Dm444 ${finalAttrs.ioquake3_mac}/extras/zpack-weapons.pk3 $out/baseq3/zpack-weapons.pk3 ''; preferLocalBuild = true; From a9466cb9d6b76bedf9a6e2f5720ae3eeb4405b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AErekc=C3=A4H=20nitraM=E2=80=AE?= Date: Fri, 25 Apr 2025 14:29:28 +0200 Subject: [PATCH 17/19] quake3-hires: better attribution I had communication from the upstream project that clarified where some of the paks he provides came from. Mostly they are custom repacks of him, which means it's correct to get them from his repo. --- pkgs/games/quake3/content/hires.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/games/quake3/content/hires.nix b/pkgs/games/quake3/content/hires.nix index e207d23d919e..ec07228f03d1 100644 --- a/pkgs/games/quake3/content/hires.nix +++ b/pkgs/games/quake3/content/hires.nix @@ -37,8 +37,10 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-pL7MsEFsKJV+a+z45Ns16SPdQB3i2D6T3x7tBqWtm1s="; }; - # I would like to find the original sources of the quake3-live-sounds.pk3 and zpack-weapons.pk3 files - # Any hints are welcome + # According to the @diegoulloao (see https://github.com/diegoulloao/ioquake3-mac-install/issues/23#issuecomment-2817031996) + # quake3-live-sounds.pk3 is likely a custom repack from https://www.moddb.com/addons/quake-live-announcers-pack + # zpack-weapons.pk3 is an amalgamation of multiple mods, where he can't recall which ones he used exactly. + # It still makes him the authorative source for these file. ioquake3_mac = fetchFromGitHub { owner = "diegoulloao"; repo = "ioquake3-mac-install"; From 054514a5633daa8a032bb26d1dc6bfe5d657c7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ha=CC=88cker?= Date: Sat, 7 Jun 2025 16:19:51 +0200 Subject: [PATCH 18/19] quake3: Update resolution guidance The smaller resolutions do not seem to work anymore (on macos at least). Here the smaller resolution still leave black bars behind. --- pkgs/games/quake3/content/arena.nix | 4 ++-- pkgs/games/quake3/content/demo.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/games/quake3/content/arena.nix b/pkgs/games/quake3/content/arena.nix index 1f1ea545fb9d..3d5b85717282 100644 --- a/pkgs/games/quake3/content/arena.nix +++ b/pkgs/games/quake3/content/arena.nix @@ -51,11 +51,11 @@ stdenv.mkDerivation (finalAttrs: { To switch to such a resolution, you will have to enter something like this in the quake console (invoke with ~ by default) - r_mode -1; r_customwidth 1920; r_customheight 1080; r_fullscreen 1; vid_restart + r_mode -1; r_customwidth 2560; r_customheight 1440; r_fullscreen 1; vid_restart Or call the quake commandline with these parameters - $ +set r_mode -1 +set r_customwidth 1920 +set r_customheight 1080 +set r_fullscreen 1 +vid_restart + $ quake3 +set r_mode -1 +set r_customwidth 2560 +set r_customheight 1440 +set r_fullscreen 1 ''; homepage = "https://www.idsoftware.com/"; license = lib.licenses.unfreeRedistributable; diff --git a/pkgs/games/quake3/content/demo.nix b/pkgs/games/quake3/content/demo.nix index 678f582bb3b9..9be05d8b90bb 100644 --- a/pkgs/games/quake3/content/demo.nix +++ b/pkgs/games/quake3/content/demo.nix @@ -32,11 +32,11 @@ stdenv.mkDerivation { To switch to such a resolution, you will have to enter something like this in the quake console (invoke with ~ by default) - r_mode -1; r_customwidth 1920; r_customheight 1080; r_fullscreen 1; vid_restart + r_mode -1; r_customwidth 2560; r_customheight 1440; r_fullscreen 1; vid_restart Or call the quake commandline with these parameters - $ quake3 +set r_mode -1 +set r_customwidth 1920 +set r_customheight 1080 +set r_fullscreen 1 +vid_restart + $ quake3 +set r_mode -1 +set r_customwidth 2560 +set r_customheight 1440 +set r_fullscreen 1 ''; homepage = "https://www.idsoftware.com/"; license = licenses.unfreeRedistributable; From 65b3fa956f1a93d254b60780e1b6d4de66c36374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ha=CC=88cker?= Date: Sat, 7 Jun 2025 16:23:31 +0200 Subject: [PATCH 19/19] quake3: fix mainProgram This fixes `nix run` invocations --- pkgs/games/quake3/wrapper/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index ce29fcbb9729..0a69a3ce39dc 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -65,6 +65,7 @@ stdenv.mkDerivation { ''; meta = { + mainProgram = "${pname}"; inherit ((lib.head paks).meta) description longDescription