From 1cfac7d2bc779771e647c3bb888fc565d2c3feb4 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 20 Sep 2022 21:21:14 +0200 Subject: [PATCH 1/2] legendary-gl: use latest python --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a63f783a98e0..9bf6dabea88f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33861,7 +33861,7 @@ with pkgs; leela-zero = libsForQt5.callPackage ../games/leela-zero { }; - legendary-gl = python38Packages.callPackage ../games/legendary-gl { }; + legendary-gl = python3Packages.callPackage ../games/legendary-gl { }; left4gore-bin = callPackage ../games/left4gore { }; From 00b57fb2c09774fa376b3f5935af78b7b981d9fa Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Tue, 20 Sep 2022 21:21:28 +0200 Subject: [PATCH 2/2] rare: 1.8.9 -> 1.9.2 --- pkgs/games/rare/default.nix | 17 +++++++---------- pkgs/games/rare/fix-instance.patch | 10 ++++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 pkgs/games/rare/fix-instance.patch diff --git a/pkgs/games/rare/default.nix b/pkgs/games/rare/default.nix index d23645242fdf..5392062585c7 100644 --- a/pkgs/games/rare/default.nix +++ b/pkgs/games/rare/default.nix @@ -1,16 +1,15 @@ { lib, fetchFromGitHub, buildPythonApplication, qt5 -, psutil, pypresence, pyqt5, python, qtawesome, requests }: +, legendary-gl, pypresence, pyqt5, python, qtawesome, requests, typing-extensions }: buildPythonApplication rec { pname = "rare"; - version = "1.8.9"; + version = "1.9.2"; src = fetchFromGitHub { owner = "Dummerle"; repo = "Rare"; rev = version; - sha256 = "sha256-2l8Id+bA5Ugb8+3ioiZ78dUtDusU8cvZEAMhmYBcJFc="; - fetchSubmodules = true; + sha256 = "sha256-mL23tq5Fvd/kXAr7PZ+le5lRXwV3rKG/s8GuXE+S11M="; }; nativeBuildInputs = [ @@ -18,19 +17,17 @@ buildPythonApplication rec { ]; propagatedBuildInputs = [ - psutil + legendary-gl pypresence pyqt5 qtawesome requests + typing-extensions ]; - dontWrapQtApps = true; + patches = [ ./fix-instance.patch ]; - preBuild = '' - # Solves "PermissionError: [Errno 13] Permission denied: '/homeless-shelter'" - export HOME=$(mktemp -d) - ''; + dontWrapQtApps = true; postInstall = '' install -Dm644 misc/rare.desktop -t $out/share/applications/ diff --git a/pkgs/games/rare/fix-instance.patch b/pkgs/games/rare/fix-instance.patch new file mode 100644 index 000000000000..9f0ed0600d62 --- /dev/null +++ b/pkgs/games/rare/fix-instance.patch @@ -0,0 +1,10 @@ +diff --git a/rare/utils/misc.py b/rare/utils/misc.py +index 4492074..5352dac 100644 +--- a/rare/utils/misc.py ++++ b/rare/utils/misc.py +@@ -190,6 +190,7 @@ def get_rare_executable() -> List[str]: + executable = [sys.executable] + + executable[0] = os.path.abspath(executable[0]) ++ executable.pop(0) + return executable