From 5a4a82021875d253ed7f6006a6464e0745f67f02 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sun, 13 Jul 2025 08:45:24 -0400 Subject: [PATCH] vkquake: properly enable user directory support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 302c3a7a168c41555dd35576a0ab5c872ba226b3 added this line to pkgs/games/quakespasm/vulkan.nix: > buildFlags = [ "DO_USERDIRS=1" ]; At the time, Nixpkgs was shipping version 0.97.3 of vkQuake. That version of vkQuake only used make as its build system. buildFlags passes additional flags to make, so it made sense to use buildFlags at the time. As of this vkQuake commit [1], vkQuake now uses Meson as its main build system and has a Meson option for enabling user directory support. Setting buildFlags no longer seems to work. In order to enable user directory support, it seems that we now need to use mesonFlags instead of buildFlags. [1]: --- This change can be tested by doing the following: 1. Make sure that ~/.vkquake/ contains a valid id1 subdirectory. 2. Change directory into a directory that doesn’t contain an id1 subdirectory by running this command: cd /var/empty 3. Start vkQuake by running this command: nix-shell -p '(import { }).vkquake' --run vkquake Before this change was made, if you followed those instructions, then vkQuake would give you an error about not being able to load gfx.wad: > $ nix-shell -p '(import "/home/jayman/Documents/Home/VC/Git/Partially mine/nixpkgs/repo" { }).vkquake' --run vkquake > Command line: vkquake > Found SDL version 2.32.56 > Detected 12 CPUs. > Initializing vkQuake 1.32.3 > Built with GCC 14.3.0 > Host_Init > Playing shareware version. > > ERROR-OUT BEGIN > > > QUAKE ERROR: W_LoadWadFile: couldn't load gfx.wad > > Basedir is: /var/empty > > Check that this has an id1 subdirectory containing pak0.pak and pak1.pak, or use the -basedir command-line option to specify another directory. > > > (zenity:55857): Gtk-WARNING **: 10:05:55.434: Unknown key gtk-modules in /home/jayman/.config/gtk-4.0/settings.ini > > (zenity:55857): Adwaita-WARNING **: 10:05:56.380: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead. > $ echo "$?" > 1 Now that this change has been made, if you follow those instructions, then vkQuake will start successfully, and Quake’s first demo will start to play. --- pkgs/games/quakespasm/vulkan.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/quakespasm/vulkan.nix b/pkgs/games/quakespasm/vulkan.nix index 1f3f25a9b119..1f1db3b66a0d 100644 --- a/pkgs/games/quakespasm/vulkan.nix +++ b/pkgs/games/quakespasm/vulkan.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { vulkan-headers ]; - buildFlags = [ "DO_USERDIRS=1" ]; + mesonFlags = [ "-Ddo_userdirs=enabled" ]; env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [