diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-09 23:04:12 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-05 11:10:50 +0000 |
commit | dd8d813a73e1a7c4a2a34de3d209c282caf8904e (patch) | |
tree | 9d25efa2d92429076477bd173e4a677617a290cb /pkgs/games/blackshades | |
parent | a63c9818ba93175ab46a9ed6c63e2777e9bd3ea9 (diff) |
blackshades: use zigHook
Also, a cosmetic refactor: - Reorder parameter listing - Use rec-less, overlay-style overridable recursive attributes (in effect since NixOS#119942); - Remove nested with (according to https://nix.dev/recipes/best-practices#with-scopes)
Diffstat (limited to 'pkgs/games/blackshades')
-rw-r--r-- | pkgs/games/blackshades/default.nix | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/pkgs/games/blackshades/default.nix b/pkgs/games/blackshades/default.nix index bd21fc0807038..c107b068816c3 100644 --- a/pkgs/games/blackshades/default.nix +++ b/pkgs/games/blackshades/default.nix @@ -1,34 +1,41 @@ -{ lib, stdenv, fetchFromSourcehut -, zig, glfw, libGLU, libGL, openal, libsndfile }: +{ lib +, stdenv +, fetchFromSourcehut +, glfw +, libGL +, libGLU +, libsndfile +, openal +, zigHook +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "blackshades"; version = "2.4.9"; src = fetchFromSourcehut { owner = "~cnx"; - repo = pname; - rev = version; + repo = "blackshades"; + rev = finalAttrs.version; fetchSubmodules = true; - sha256 = "sha256-Hg+VcWI28GzY/CPm1lUftP0RGztOnzizrKJQVTmeJ9I="; + hash = "sha256-Hg+VcWI28GzY/CPm1lUftP0RGztOnzizrKJQVTmeJ9I="; }; - nativeBuildInputs = [ zig ]; - buildInputs = [ glfw libGLU libGL openal libsndfile ]; + nativeBuildInputs = [ zigHook ]; - preBuild = '' - export HOME=$TMPDIR - ''; - - installPhase = '' - zig build -Drelease-fast -Dcpu=baseline --prefix $out install - ''; + buildInputs = [ + glfw + libGLU + libGL + libsndfile + openal + ]; meta = { homepage = "https://sr.ht/~cnx/blackshades"; description = "A psychic bodyguard FPS"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ McSinyx viric ]; - platforms = with lib.platforms; linux; + platforms = lib.platforms.linux; }; -} +}) |