Quake 3 Arena Dedicated Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
quakeflake/pkgs/baseq3.nix

58 lines
1.4 KiB

{ self, nixpkgs, system }:
with (import nixpkgs {
inherit system;
config = { allowUnfree = true; };
});
rec {
q3iso = fetchurl {
url = "https://archive.org/download/quake-iii/Quake%20III.iso";
name = "QuakeIII.iso";
sha256 = "1qgk5kx7mf75dvlf54x15dpvjvwwh27q6m3cgg8gyiv57hw20cp9";
};
isoBaseq3 = stdenv.mkDerivation {
name = "baseq3";
src = q3iso;
nativeBuildInputs = [ p7zip ];
unpackPhase = ''
7z x $src
'';
installPhase = ''
cp -a baseq3 $out
'';
};
mappaks = import ./mappaks.nix { inherit fetchurl; };
baseq3 = runCommand "baseq3" {} ''
mkdir $out
# pak0
ln -s ${isoBaseq3}/* $out/
# pak1..6
ln -s ${quake3pointrelease}/baseq3/* $out/
# mappaks
${lib.concatMapStrings (name: ''
ln -s ${mappaks.${name}} $out/${name}.pk3
'') (builtins.attrNames mappaks)}
# cfg
ln -s ${../q3config_server.cfg} $out/q3config_server.cfg
ln -s ${../ctf.cfg} $out/ctf.cfg
ln -s ${../ctc-tdm.cfg} $out/ctc-tdm.cfg
ln -s ${../randomctfmaps.cfg} $out/randomctfmaps.cfg
'';
q3ctc = runCommand "q3ctc" {
src = fetchurl {
url = "http://share.pedalkickers.de/fps/quake3/q3ctc-v1_4.zip";
sha256 = "0yx3gh0lnkdzb2iqa353ybvhqgm0hr25d3cyhlzm549mfh1qyh0q";
};
nativeBuildInputs = [ unzip ];
} ''
mkdir q3ctc
cd q3ctc
unzip $src
cd ..
cp -ar q3ctc $out
'';
}