quake3wrapper: split from quake3demo, make a function and fix multiple paks

This commit is contained in:
Nikolay Amiantov
2016-01-14 14:41:33 +03:00
parent 6b447a3c9b
commit 5981fc4b6f
3 changed files with 17 additions and 8 deletions
+2 -2
View File
@@ -2,8 +2,8 @@ source $stdenv/setup
mkdir -p $out/baseq3
for i in $paks; do
if test -d "$paks/baseq3"; then
ln -s $paks/baseq3/* $out/baseq3/
if test -d "$i/baseq3"; then
ln -s "$i/baseq3"/* $out/baseq3/
fi
done
+11 -3
View File
@@ -1,13 +1,21 @@
{stdenv, fetchurl, game, paks, mesa, name, description, makeWrapper}:
{ stdenv, fetchurl, mesa, ioquake3, makeWrapper }:
{ paks, name ? (stdenv.lib.head paks).name, description ? "" }:
stdenv.mkDerivation {
name = "${name}-${ioquake3.name}";
builder = ./builder.sh;
buildInputs = [makeWrapper];
nativeBuildInputs = [ makeWrapper ];
inherit game paks mesa name;
inherit paks mesa;
game = ioquake3;
gcc = stdenv.cc.cc;
preferLocalBuild = true;
meta = {
inherit description;