2022-01-23 20:34:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub }:
|
2018-04-11 18:37:40 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
games = {
|
|
|
|
ctf = {
|
|
|
|
id = "ctf";
|
2020-05-31 07:54:45 +00:00
|
|
|
version = "1.07";
|
2018-04-11 18:37:40 +00:00
|
|
|
description = "'Capture The Flag' for Yamagi Quake II";
|
2020-05-31 07:54:45 +00:00
|
|
|
sha256 = "0i9bwhjvq6yhalrsbzjambh27fdzrzgswqz3jgfn9qw6k1kjvlin";
|
2018-04-11 18:37:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ground-zero = {
|
|
|
|
id = "rogue";
|
2020-05-31 07:54:45 +00:00
|
|
|
version = "2.07";
|
2018-04-11 18:37:40 +00:00
|
|
|
description = "'Ground Zero' for Yamagi Quake II";
|
2020-05-31 07:54:45 +00:00
|
|
|
sha256 = "1m2r4vgfdxpsi0lkf32liwf1433mdhhmjxiicjwzqjlkncjyfcb1";
|
2018-04-11 18:37:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
the-reckoning = {
|
|
|
|
id = "xatrix";
|
2020-05-31 07:54:45 +00:00
|
|
|
version = "2.08";
|
2018-04-11 18:37:40 +00:00
|
|
|
description = "'The Reckoning' for Yamagi Quake II";
|
2020-05-31 07:54:45 +00:00
|
|
|
sha256 = "1wp9fg1q8nly2r9hh4394r1h4dxyni3lvdy7g419cz5s8hhn5msr";
|
2018-04-11 18:37:40 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
toDrv = title: data: stdenv.mkDerivation rec {
|
|
|
|
inherit (data) id version description sha256;
|
|
|
|
inherit title;
|
|
|
|
|
2021-06-22 21:44:58 +00:00
|
|
|
pname = "yquake2-${title}";
|
2018-04-11 18:37:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit sha256;
|
|
|
|
owner = "yquake2";
|
|
|
|
repo = data.id;
|
|
|
|
rev = "${lib.toUpper id}_${builtins.replaceStrings ["."] ["_"] version}";
|
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-02-03 17:13:52 +00:00
|
|
|
runHook preInstall
|
2018-04-11 18:37:40 +00:00
|
|
|
mkdir -p $out/lib/yquake2/${id}
|
2022-01-23 20:34:52 +00:00
|
|
|
cp release/* $out/lib/yquake2/${id}
|
2024-02-03 17:13:52 +00:00
|
|
|
runHook postInstall
|
2018-04-11 18:37:40 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-11 18:37:40 +00:00
|
|
|
inherit (data) description;
|
|
|
|
homepage = "https://www.yamagi.org/quake2/";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
lib.mapAttrs toDrv games
|