depot/third_party/nixpkgs/pkgs/games/zod/default.nix
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

46 lines
1.1 KiB
Nix

{ lib, fetchurl, stdenv, unrar, unzip, SDL, SDL_image, SDL_ttf, SDL_mixer
, libmysqlclient, makeWrapper }:
stdenv.mkDerivation {
name = "zod-engine-2011-03-18";
src = fetchurl {
url = "mirror://sourceforge/zod/zod_src-2011-03-18.zip";
sha256 = "00ny7a1yfn9zgl7q1ys27qafwc92dzxv07wjxl8nxa4f98al2g4n";
};
srcAssets = fetchurl {
url = "mirror://sourceforge/zod/zod_assets-2011-03-12.rar";
sha256 = "0gmg4ppr4y6ck04mandlp2fmdcyssmck999m012jx5v1rm57g2hn";
};
hardeningDisable = [ "format" ];
unpackPhase = ''
mkdir src
pushd src
unzip $src
popd
sourceRoot=`pwd`/src
'';
nativeBuildInputs = [ makeWrapper unrar unzip ];
buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer libmysqlclient ];
NIX_LDFLAGS = "-L${libmysqlclient}/lib/mysql";
installPhase = ''
mkdir -p $out/bin $out/share/zod
pushd $out/share/zod
unrar x $srcAssets
popd
cp zod $out/bin
wrapProgram $out/bin/zod --run "cd $out/share/zod"
'';
meta = {
description = "Multiplayer remake of ZED";
homepage = "http://zod.sourceforge.net/";
license = lib.licenses.gpl3Plus; /* Says the web */
};
}