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)
This commit is contained in:
parent
a63c9818ba
commit
dd8d813a73
|
@ -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;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
@ -37145,7 +37145,9 @@ with pkgs;
|
|||
};
|
||||
|
||||
blackshades = callPackage ../games/blackshades {
|
||||
zig = buildPackages.zig_0_9;
|
||||
zigHook = zigHook.override {
|
||||
zig = buildPackages.zig_0_9;
|
||||
};
|
||||
};
|
||||
|
||||
blobby = callPackage ../games/blobby { };
|
||||
|
|
Loading…
Reference in a new issue