about 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/blobwars/blobwars-2.00-glibc-2.38.patch11
-rw-r--r--pkgs/games/blobwars/default.nix2
-rw-r--r--pkgs/games/portmod/default.nix25
3 files changed, 32 insertions, 6 deletions
diff --git a/pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch b/pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
new file mode 100644
index 0000000000000..4fe3e373afda6
--- /dev/null
+++ b/pkgs/games/blobwars/blobwars-2.00-glibc-2.38.patch
@@ -0,0 +1,11 @@
+--- a/src/headers.h
++++ b/src/headers.h
+@@ -56,7 +56,7 @@ extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
+ #define textdomain(x) while(false)
+ #endif
+ 
+-#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__)
++#if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) && !(defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38)
+ static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); }
+ static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; }
+ #endif
diff --git a/pkgs/games/blobwars/default.nix b/pkgs/games/blobwars/default.nix
index b0951064c24cf..dd94fc1096966 100644
--- a/pkgs/games/blobwars/default.nix
+++ b/pkgs/games/blobwars/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
   };
 
+  patches = [ ./blobwars-2.00-glibc-2.38.patch ];
+
   nativeBuildInputs = [ pkg-config gettext ];
   buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
   env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
diff --git a/pkgs/games/portmod/default.nix b/pkgs/games/portmod/default.nix
index c67626d0b0051..f9631c6d764f1 100644
--- a/pkgs/games/portmod/default.nix
+++ b/pkgs/games/portmod/default.nix
@@ -12,20 +12,20 @@
 }:
 
 let
-  version = "2.1.0";
+  version = "2.6.2";
 
   src = fetchFromGitLab {
     owner = "portmod";
     repo = "Portmod";
     rev = "v${version}";
-    hash = "sha256-b/ENApFovMPNUMbJhwY+TZCnSzpr1e/IKJ/5XAGTQjE=";
+    hash = "sha256-ufr2guaPdCvI5JOicL/lTrT3t6UlaY1hEB2xbwzhw6A=";
   };
 
   portmod-rust = rustPlatform.buildRustPackage rec {
     inherit src version;
     pname = "portmod-rust";
 
-    cargoHash = "sha256-3EfMMpSWSYsB3nXaoGGDuKQ9duyCKzbrT6oeATnzqLE=";
+    cargoHash = "sha256-sAjgGVVjgXaWbmN/eGEvatYjkHeFTZNX1GXFcJqs3GI=";
 
     nativeBuildInputs = [
       python3Packages.python
@@ -49,22 +49,32 @@ python3Packages.buildPythonApplication rec {
   inherit src version;
 
   pname = "portmod";
+  format = "pyproject";
 
-  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
 
   # build the rust library independantly
   prePatch = ''
     substituteInPlace setup.py \
-      --replace "from setuptools_rust import Binding, RustExtension" "" \
-      --replace "RustExtension(\"portmodlib.portmod\", binding=Binding.PyO3, strip=True)" ""
+      --replace "from setuptools_rust import Binding, RustExtension, Strip" "" \
+      --replace "RustExtension(\"portmodlib.portmod\", binding=Binding.PyO3, strip=Strip.Debug)" ""
+
+    substituteInPlace pyproject.toml \
+      --replace '"setuptools-rust"' ""
   '';
 
+  nativeBuildInputs = with python3Packages; [
+    setuptools
+    wheel
+  ];
+
   propagatedBuildInputs = with python3Packages; [
     setuptools-scm
     setuptools
     requests
     chardet
     colorama
+    deprecated
     restrictedpython
     appdirs
     gitpython
@@ -95,6 +105,9 @@ python3Packages.buildPythonApplication rec {
     "test_sync"
     "test_manifest"
     "test_add_repo"
+    "test_init_prefix_interactive"
+    "test_scan_sources"
+    "test_unpack"
   ];
 
   # for some reason, installPhase doesn't copy the compiled binary