From 497afae7e860033c820d762a418b05ee6307a651 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 6 Dec 2020 02:46:01 +0100 Subject: [PATCH] sauerbraten: 5492 -> 2020-12-04 http://www.sauerworld.org/new-sauerbraten-2020-edition-released/ --- pkgs/games/sauerbraten/default.nix | 53 +++++++++++++----------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/pkgs/games/sauerbraten/default.nix b/pkgs/games/sauerbraten/default.nix index c4119ee43636..e1f482cc7d40 100644 --- a/pkgs/games/sauerbraten/default.nix +++ b/pkgs/games/sauerbraten/default.nix @@ -1,50 +1,43 @@ -{ stdenv, fetchsvn, SDL2, SDL2_image, SDL2_mixer -, zlib, runtimeShell +{ stdenv, fetchzip, SDL2, SDL2_image, SDL2_mixer +, zlib, makeWrapper }: stdenv.mkDerivation rec { - name = "sauerbraten-r${version}"; - version = "5492"; + pname = "sauerbraten"; + version = "2020-12-04"; - src = fetchsvn { - url = "https://svn.code.sf.net/p/sauerbraten/code"; - sha256 = "0pin7ggy84fadjvran18db5v0l81qfv42faknpfaxx47xqz00l5s"; - rev = version; + src = fetchzip { + url = "mirror://sourceforge/sauerbraten/sauerbraten_${builtins.replaceStrings [ "-" ] [ "_" ] version}_linux.tar.bz2"; + sha256 = "1hknwpnvsakz6s7l7j1r5aqmgrzp4wcbn8yg8nxmvsddbhxdj1kc"; }; + nativeBuildInputs = [ + makeWrapper + ]; + buildInputs = [ SDL2 SDL2_mixer SDL2_image zlib ]; - preBuild = '' - export NIX_LDFLAGS="$NIX_LDFLAGS -lX11" - pushd src - ''; + sourceRoot = "source/src"; installPhase = '' - popd mkdir -p $out/bin $out/share/sauerbraten $out/share/doc/sauerbraten - cp -rv "docs/"* $out/share/doc/sauerbraten/ - cp -v src/sauer_client src/sauer_server $out/share/sauerbraten/ - cp -rv packages $out/share/sauerbraten/ - cp -rv data $out/share/sauerbraten/ - cat > $out/bin/sauerbraten_server < $out/bin/sauerbraten_client <