nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 68 lines 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5}: 6 7let 8 games = { 9 ctf = { 10 id = "ctf"; 11 version = "1.07"; 12 description = "'Capture The Flag' for Yamagi Quake II"; 13 sha256 = "0i9bwhjvq6yhalrsbzjambh27fdzrzgswqz3jgfn9qw6k1kjvlin"; 14 }; 15 16 ground-zero = { 17 id = "rogue"; 18 version = "2.07"; 19 description = "'Ground Zero' for Yamagi Quake II"; 20 sha256 = "1m2r4vgfdxpsi0lkf32liwf1433mdhhmjxiicjwzqjlkncjyfcb1"; 21 }; 22 23 the-reckoning = { 24 id = "xatrix"; 25 version = "2.08"; 26 description = "'The Reckoning' for Yamagi Quake II"; 27 sha256 = "1wp9fg1q8nly2r9hh4394r1h4dxyni3lvdy7g419cz5s8hhn5msr"; 28 }; 29 }; 30 31 toDrv = 32 title: data: 33 stdenv.mkDerivation rec { 34 inherit (data) 35 id 36 version 37 description 38 sha256 39 ; 40 inherit title; 41 42 pname = "yquake2-${title}"; 43 44 src = fetchFromGitHub { 45 inherit sha256; 46 owner = "yquake2"; 47 repo = data.id; 48 rev = "${lib.toUpper id}_${builtins.replaceStrings [ "." ] [ "_" ] version}"; 49 }; 50 51 installPhase = '' 52 runHook preInstall 53 mkdir -p $out/lib/yquake2/${id} 54 cp release/* $out/lib/yquake2/${id} 55 runHook postInstall 56 ''; 57 58 meta = with lib; { 59 inherit (data) description; 60 homepage = "https://www.yamagi.org/quake2/"; 61 license = licenses.unfree; 62 platforms = platforms.unix; 63 maintainers = with maintainers; [ tadfisher ]; 64 }; 65 }; 66 67in 68lib.mapAttrs toDrv games