uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
90
pkgs/games/quake2/yquake2/default.nix
Normal file
90
pkgs/games/quake2/yquake2/default.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{ stdenv, lib, fetchFromGitHub, buildEnv, makeWrapper
|
||||
, SDL2, libGL, curl
|
||||
, openalSupport ? true, openal
|
||||
, Cocoa, OpenAL
|
||||
}:
|
||||
|
||||
let
|
||||
mkFlag = b: if b then "yes" else "no";
|
||||
|
||||
games = import ./games.nix { inherit stdenv lib fetchFromGitHub; };
|
||||
|
||||
wrapper = import ./wrapper.nix { inherit stdenv lib buildEnv makeWrapper yquake2; };
|
||||
|
||||
yquake2 = stdenv.mkDerivation rec {
|
||||
pname = "yquake2";
|
||||
version = "8.01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yquake2";
|
||||
repo = "yquake2";
|
||||
rev = "QUAKE2_${builtins.replaceStrings ["."] ["_"] version}";
|
||||
sha256 = "1dll5lx4bnls5w5f2zwjhwpcpxa97rjn6ymb2v3vrjm19jbd16yd";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/client/curl/qcurl.c \
|
||||
--replace "\"libcurl.so.3\", \"libcurl.so.4\"" "\"${curl.out}/lib/libcurl.so\", \"libcurl.so.3\", \"libcurl.so.4\""
|
||||
'' + lib.optionalString (openalSupport && !stdenv.isDarwin) ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "\"libopenal.so.1\"" "\"${openal}/lib/libopenal.so.1\""
|
||||
'';
|
||||
|
||||
buildInputs = [ SDL2 libGL curl ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ]
|
||||
++ lib.optional openalSupport openal;
|
||||
|
||||
makeFlags = [
|
||||
"WITH_OPENAL=${mkFlag openalSupport}"
|
||||
"WITH_SYSTEMWIDE=yes"
|
||||
"WITH_SYSTEMDIR=$\{out}/share/games/quake2"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
# Yamagi Quake II expects all binaries (executables and libs) to be in the
|
||||
# same directory.
|
||||
mkdir -p $out/bin $out/lib/yquake2 $out/share/games/quake2/baseq2
|
||||
cp -r release/* $out/lib/yquake2
|
||||
ln -s $out/lib/yquake2/quake2 $out/bin/yquake2
|
||||
ln -s $out/lib/yquake2/q2ded $out/bin/yq2ded
|
||||
cp $src/stuff/yq2.cfg $out/share/games/quake2/baseq2
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yamagi Quake II client";
|
||||
homepage = "https://www.yamagi.org/quake2/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ tadfisher ];
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
inherit yquake2;
|
||||
|
||||
yquake2-ctf = wrapper {
|
||||
games = [ games.ctf ];
|
||||
name = "yquake2-ctf";
|
||||
inherit (games.ctf) description;
|
||||
};
|
||||
|
||||
yquake2-ground-zero = wrapper {
|
||||
games = [ games.ground-zero ];
|
||||
name = "yquake2-ground-zero";
|
||||
inherit (games.ground-zero) description;
|
||||
};
|
||||
|
||||
yquake2-the-reckoning = wrapper {
|
||||
games = [ games.the-reckoning ];
|
||||
name = "yquake2-the-reckoning";
|
||||
inherit (games.the-reckoning) description;
|
||||
};
|
||||
|
||||
yquake2-all-games = wrapper {
|
||||
games = lib.attrValues games;
|
||||
name = "yquake2-all-games";
|
||||
description = "Yamagi Quake II with all add-on games";
|
||||
};
|
||||
}
|
||||
55
pkgs/games/quake2/yquake2/games.nix
Normal file
55
pkgs/games/quake2/yquake2/games.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
games = {
|
||||
ctf = {
|
||||
id = "ctf";
|
||||
version = "1.07";
|
||||
description = "'Capture The Flag' for Yamagi Quake II";
|
||||
sha256 = "0i9bwhjvq6yhalrsbzjambh27fdzrzgswqz3jgfn9qw6k1kjvlin";
|
||||
};
|
||||
|
||||
ground-zero = {
|
||||
id = "rogue";
|
||||
version = "2.07";
|
||||
description = "'Ground Zero' for Yamagi Quake II";
|
||||
sha256 = "1m2r4vgfdxpsi0lkf32liwf1433mdhhmjxiicjwzqjlkncjyfcb1";
|
||||
};
|
||||
|
||||
the-reckoning = {
|
||||
id = "xatrix";
|
||||
version = "2.08";
|
||||
description = "'The Reckoning' for Yamagi Quake II";
|
||||
sha256 = "1wp9fg1q8nly2r9hh4394r1h4dxyni3lvdy7g419cz5s8hhn5msr";
|
||||
};
|
||||
};
|
||||
|
||||
toDrv = title: data: stdenv.mkDerivation rec {
|
||||
inherit (data) id version description sha256;
|
||||
inherit title;
|
||||
|
||||
pname = "yquake2-${title}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit sha256;
|
||||
owner = "yquake2";
|
||||
repo = data.id;
|
||||
rev = "${lib.toUpper id}_${builtins.replaceStrings ["."] ["_"] version}";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/yquake2/${id}
|
||||
cp release/* $out/lib/yquake2/${id}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit (data) description;
|
||||
homepage = "https://www.yamagi.org/quake2/";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ tadfisher ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
lib.mapAttrs toDrv games
|
||||
31
pkgs/games/quake2/yquake2/wrapper.nix
Normal file
31
pkgs/games/quake2/yquake2/wrapper.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, lib, buildEnv, makeWrapper, yquake2 }:
|
||||
|
||||
{ games
|
||||
, name
|
||||
, description
|
||||
}:
|
||||
|
||||
let
|
||||
env = buildEnv {
|
||||
name = "${name}-env";
|
||||
paths = [ yquake2 ] ++ games;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "${name}-${lib.getVersion yquake2}";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
'' + lib.concatMapStringsSep "\n" (game: ''
|
||||
makeWrapper ${env}/bin/yquake2 $out/bin/yquake2-${game.title} \
|
||||
--add-flags "+set game ${game.id}"
|
||||
makeWrapper ${env}/bin/yq2ded $out/bin/yq2ded-${game.title} \
|
||||
--add-flags "+set game ${game.id}"
|
||||
'') games;
|
||||
|
||||
meta = {
|
||||
inherit description;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue