diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-01-04 15:36:49 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-01-14 14:41:33 +0300 |
commit | 5981fc4b6f24f9ffb46558dfee7b12ba2c935935 (patch) | |
tree | d95bb4dc1f58404c87b129b7d0b09c3f42005b7e /pkgs/games/quake3 | |
parent | 6b447a3c9bbee41389052d6fa9e08a53d8447656 (diff) |
quake3wrapper: split from quake3demo, make a function and fix multiple paks
Diffstat (limited to 'pkgs/games/quake3')
-rw-r--r-- | pkgs/games/quake3/wrapper/builder.sh | 4 | ||||
-rw-r--r-- | pkgs/games/quake3/wrapper/default.nix | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/games/quake3/wrapper/builder.sh b/pkgs/games/quake3/wrapper/builder.sh index 6b5bd7450c570..d5115baa7e6d8 100644 --- a/pkgs/games/quake3/wrapper/builder.sh +++ b/pkgs/games/quake3/wrapper/builder.sh @@ -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 diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index f9e2e864f1972..ae0387ad29005 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -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; |