From fdc5d84e66a1c0a5b4db9e4af6fee35f8e42ee08 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 9 Nov 2024 00:48:07 +0100 Subject: [PATCH 1/5] wipeout-rewrite: nixfmt --- pkgs/games/wipeout-rewrite/default.nix | 31 ++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/pkgs/games/wipeout-rewrite/default.nix b/pkgs/games/wipeout-rewrite/default.nix index 99e7d9b9d31c..d42b942cc051 100644 --- a/pkgs/games/wipeout-rewrite/default.nix +++ b/pkgs/games/wipeout-rewrite/default.nix @@ -1,11 +1,12 @@ -{ stdenv -, lib -, fetchFromGitHub -, makeWrapper -, Foundation -, glew -, SDL2 -, writeShellScript +{ + stdenv, + lib, + fetchFromGitHub, + makeWrapper, + Foundation, + glew, + SDL2, + writeShellScript, }: let @@ -39,12 +40,14 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ]; - buildInputs = [ - glew - SDL2 - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Foundation - ]; + buildInputs = + [ + glew + SDL2 + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + Foundation + ]; installPhase = '' runHook preInstall From fed528af315000ebffd23b067bd3a408501302fc Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 9 Nov 2024 00:50:55 +0100 Subject: [PATCH 2/5] wipeout-rewrite: Drop meta-wide "with lib" --- pkgs/games/wipeout-rewrite/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/games/wipeout-rewrite/default.nix b/pkgs/games/wipeout-rewrite/default.nix index d42b942cc051..e0ea54b3a6d0 100644 --- a/pkgs/games/wipeout-rewrite/default.nix +++ b/pkgs/games/wipeout-rewrite/default.nix @@ -63,12 +63,12 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; - meta = with lib; { + meta = { mainProgram = "wipegame"; description = "Re-implementation of the 1995 PSX game wipEout"; homepage = "https://github.com/phoboslab/wipeout-rewrite"; - license = licenses.unfree; - maintainers = with maintainers; [ OPNA2608 ]; - platforms = platforms.all; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ OPNA2608 ]; + platforms = lib.platforms.all; }; }) From 9bca23b06b3241cf10656cd338e02063d5f1be93 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 9 Nov 2024 00:52:59 +0100 Subject: [PATCH 3/5] wipeout-rewrite: Add passthru.updateScript --- pkgs/games/wipeout-rewrite/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/games/wipeout-rewrite/default.nix b/pkgs/games/wipeout-rewrite/default.nix index e0ea54b3a6d0..a8244331d361 100644 --- a/pkgs/games/wipeout-rewrite/default.nix +++ b/pkgs/games/wipeout-rewrite/default.nix @@ -2,6 +2,7 @@ stdenv, lib, fetchFromGitHub, + unstableGitUpdater, makeWrapper, Foundation, glew, @@ -63,6 +64,8 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + passthru.updateScript = unstableGitUpdater { }; + meta = { mainProgram = "wipegame"; description = "Re-implementation of the 1995 PSX game wipEout"; From 211532d7c9f2ae636b0a469f9b9d3016ec88dcaa Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 9 Nov 2024 00:58:44 +0100 Subject: [PATCH 4/5] wipeout-rewrite: Migrate to by-name --- .../wi/wipeout-rewrite/package.nix} | 13 ++++--------- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 4 insertions(+), 13 deletions(-) rename pkgs/{games/wipeout-rewrite/default.nix => by-name/wi/wipeout-rewrite/package.nix} (92%) diff --git a/pkgs/games/wipeout-rewrite/default.nix b/pkgs/by-name/wi/wipeout-rewrite/package.nix similarity index 92% rename from pkgs/games/wipeout-rewrite/default.nix rename to pkgs/by-name/wi/wipeout-rewrite/package.nix index a8244331d361..3453e540305c 100644 --- a/pkgs/games/wipeout-rewrite/default.nix +++ b/pkgs/by-name/wi/wipeout-rewrite/package.nix @@ -4,7 +4,6 @@ fetchFromGitHub, unstableGitUpdater, makeWrapper, - Foundation, glew, SDL2, writeShellScript, @@ -41,14 +40,10 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ]; - buildInputs = - [ - glew - SDL2 - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Foundation - ]; + buildInputs = [ + glew + SDL2 + ]; installPhase = '' runHook preInstall diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index beb25b36d18a..4d4fb44a17ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16840,10 +16840,6 @@ with pkgs; pmars-x11 = pmars.override { enableXwinGraphics = true; }; - wipeout-rewrite = callPackage ../games/wipeout-rewrite { - inherit (darwin.apple_sdk.frameworks) Foundation; - }; - ### GAMES/DOOM-PORTS doomseeker = qt5.callPackage ../games/doom-ports/doomseeker { }; From 58b8cb66b91d7bbd629832a65b5362c0857a620a Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 9 Nov 2024 01:31:31 +0100 Subject: [PATCH 5/5] wipeout-rewrite: unstable-2023-08-13 -> 0-unstable-2024-07-07 --- pkgs/by-name/wi/wipeout-rewrite/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wi/wipeout-rewrite/package.nix b/pkgs/by-name/wi/wipeout-rewrite/package.nix index 3453e540305c..24d51774a7bf 100644 --- a/pkgs/by-name/wi/wipeout-rewrite/package.nix +++ b/pkgs/by-name/wi/wipeout-rewrite/package.nix @@ -25,13 +25,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "wipeout-rewrite"; - version = "unstable-2023-08-13"; + version = "0-unstable-2024-07-07"; src = fetchFromGitHub { owner = "phoboslab"; repo = "wipeout-rewrite"; - rev = "7a9f757a79d5c6806252cc1268bda5cdef463e23"; - hash = "sha256-21IG9mZPGgRhVkT087G+Bz/zLkknkHKGmWjSpcLw8vE="; + rev = "a372b51f59217da4a5208352123a4acca800783c"; + hash = "sha256-RJrWOTb5cZ2rSgO/J8qW5ifMJryBaK6MDtYwQZfghS0="; }; enableParallelBuilding = true; @@ -45,6 +45,9 @@ stdenv.mkDerivation (finalAttrs: { SDL2 ]; + # Force this to empty, so assets are looked up in CWD instead of $out/bin + env.NIX_CFLAGS_COMPILE = "-DPATH_ASSETS="; + installPhase = '' runHook preInstall