summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/crispy-doom/default.nix14
-rw-r--r--pkgs/games/endgame-singularity/default.nix58
-rw-r--r--pkgs/games/pentobi/default.nix4
-rw-r--r--pkgs/games/spring/springlobby.nix4
4 files changed, 42 insertions, 38 deletions
diff --git a/pkgs/games/crispy-doom/default.nix b/pkgs/games/crispy-doom/default.nix
index ea7c3c6e478..5bd6e714e42 100644
--- a/pkgs/games/crispy-doom/default.nix
+++ b/pkgs/games/crispy-doom/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, autoreconfHook, pkgconfig, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub }:
+{ stdenv, autoreconfHook, pkgconfig, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, fetchpatch }:
 
 stdenv.mkDerivation rec {
   pname = "crispy-doom";
@@ -11,6 +11,18 @@ stdenv.mkDerivation rec {
     sha256 = "1b6gn0dysv631jynh769whww9xcss1gms78sz3nrn855q1dsvcb4";
   };
 
+  patches = [
+    # Fixes CVE-2020-14983
+    (fetchpatch {
+      url = "https://github.com/chocolate-doom/chocolate-doom/commit/f1a8d991aa8a14afcb605cf2f65cd15fda204c56.diff";
+      sha256 = "1z6pxg9azcqq7g09hjc09d01knd803nhqilkw2kbx8648hil9mgn";
+    })
+    (fetchpatch {
+      url = "https://github.com/chocolate-doom/chocolate-doom/commit/54fb12eeaa7d527defbe65e7e00e37d5feb7c597.diff";
+      sha256 = "0ww21jn02ld73rkp06f7fqy92jqv8c9q4d1mvsryag1gmvy57znj";
+    })
+  ];
+
   postPatch = ''
     sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am
   '';
diff --git a/pkgs/games/endgame-singularity/default.nix b/pkgs/games/endgame-singularity/default.nix
index 46f21629ca3..4e855dbd053 100644
--- a/pkgs/games/endgame-singularity/default.nix
+++ b/pkgs/games/endgame-singularity/default.nix
@@ -1,46 +1,38 @@
-{ stdenv, fetchurl, unzip, python2 }:
+{ stdenv
+, fetchurl
+, fetchFromGitHub
+, unzip
+, python3
+, enableDefaultMusicPack ? true
+}:
 
-python2.pkgs.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "endgame-singularity";
-  version = "0.30c";
-  format = "other";
+  version = "1.00";
 
   srcs = [
-    (fetchurl {
-      url = "http://www.emhsoft.com/singularity/singularity-${version}-src.tar.gz";
-      sha256 = "13zjhf67gmla67nkfpxb01rxs8j9n4hs0s4n9lnnq4zgb709yxgl";
+    (fetchFromGitHub {
+      owner = "singularity";
+      repo = "singularity";
+      rev = "v${version}";
+      sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl";
     })
-    (fetchurl {
+  ] ++ stdenv.lib.optional enableDefaultMusicPack (
+    fetchurl {
       url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip";
       sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb";
-    })
-  ];
-  sourceRoot = ".";
+    }
+  );
+  sourceRoot = "source";
 
   nativeBuildInputs = [ unzip ]; # The music is zipped
-  propagatedBuildInputs = with python2.pkgs; [ pygame numpy ];
-
-  # This is not an error: it needs both compilation rounds
-  buildPhase = ''
-    ${python2.interpreter} -m compileall "singularity-${version}"
-    ${python2.interpreter} -O -m compileall "singularity-${version}"
-  '';
-
-  installPhase = ''
-    install -Dm755 "singularity-${version}/singularity.py"  "$out/share/singularity.py"
-    install -Dm644 "singularity-${version}/singularity.pyo" "$out/share/singularity.pyo"
-    install -Dm644 "singularity-${version}/singularity.pyc" "$out/share/singularity.pyc"
-    cp -R "singularity-${version}/code" "singularity-${version}/data" "$out/share/"
-    cp -R "endgame-singularity-music-007" "$out/share/music"
-  '';
+  propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];
 
-  # Tell it where to find python libraries
-  # Also cd to the same directory as the code, since it uses relative paths
-  postFixup = ''
-    makeWrapper "${python2.interpreter}" "$out/bin/endgame-singularity" \
-          --set PYTHONPATH "$PYTHONPATH" \
-          --run "cd \"$out/share\"" \
-          --add-flags "$out/share/singularity.py"
+  # Add the music
+  postInstall = stdenv.lib.optionalString enableDefaultMusicPack ''
+    cp -R "../endgame-singularity-music-007" \
+          "$(echo $out/lib/python*/site-packages/singularity)/music"
+          # ↑ we cannot glob on [...]/music, it doesn't exist yet
   '';
 
   meta = {
diff --git a/pkgs/games/pentobi/default.nix b/pkgs/games/pentobi/default.nix
index 909f09a0b39..2b5a86ad52c 100644
--- a/pkgs/games/pentobi/default.nix
+++ b/pkgs/games/pentobi/default.nix
@@ -5,12 +5,12 @@
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
-  version = "18.0";
+  version = "18.1";
   pname = "pentobi";
 
   src = fetchurl {
     url = "mirror://sourceforge/pentobi/${pname}-${version}.tar.xz";
-    sha256 = "0dlvshywxijl0hrkl66szamcr77arh118f44ngr1ail8mg1fx1fy";
+    sha256 = "1vfw61lk9z7dngncmx3fggy5ld7ksdk48dpwnsq2vl5fh3f71qbq";
   };
 
   nativeBuildInputs = [ cmake docbook_xsl wrapQtAppsHook ];
diff --git a/pkgs/games/spring/springlobby.nix b/pkgs/games/spring/springlobby.nix
index e627575df94..9912675ee67 100644
--- a/pkgs/games/spring/springlobby.nix
+++ b/pkgs/games/spring/springlobby.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   pname = "springlobby";
-  version = "0.269";
+  version = "0.270";
 
   src = fetchurl {
     url = "https://springlobby.springrts.com/dl/stable/springlobby-${version}.tar.bz2";
-    sha256 = "1shgrfs4ssjj8m0c7805jisjzpc60796l0vja3yjfdksrz7yxvhg";
+    sha256 = "1r1g2hw9ipsmsmzbhsi7bxqra1za6x7j1kw12qzl5psqyq8rqbgs";
   };
 
   nativeBuildInputs = [ pkgconfig ];