about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/portmod/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
commit50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch)
treef2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/games/portmod/default.nix
parent4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff)
parentcfc75eec4603c06503ae750f88cf397e00796ea8 (diff)
downloadnixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/games/portmod/default.nix')
-rw-r--r--nixpkgs/pkgs/games/portmod/default.nix25
1 files changed, 19 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/games/portmod/default.nix b/nixpkgs/pkgs/games/portmod/default.nix
index c67626d0b005..f9631c6d764f 100644
--- a/nixpkgs/pkgs/games/portmod/default.nix
+++ b/nixpkgs/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