Merge pull request #141904 from wackbyte/update-lutris

lutris: 0.5.8.4 -> 0.5.9.1

authored by

Artturi and committed by
GitHub
b7b25c29 a4adda08

+91 -5
+24 -5
pkgs/applications/misc/lutris/default.nix
··· 15 15 , webkitgtk 16 16 , wrapGAppsHook 17 17 18 + # check inputs 19 + , xvfb-run 20 + , nose 21 + , flake8 22 + 18 23 # python dependencies 19 24 , dbus-python 20 25 , distro ··· 46 51 47 52 let 48 53 # See lutris/util/linux.py 49 - binPath = lib.makeBinPath [ 54 + requiredTools = [ 50 55 xrandr 51 56 pciutils 52 57 psmisc ··· 64 69 xorg.xkbcomp 65 70 ]; 66 71 72 + binPath = lib.makeBinPath requiredTools; 73 + 67 74 gstDeps = with gst_all_1; [ 68 75 gst-libav 69 76 gst-plugins-bad ··· 76 83 in 77 84 buildPythonApplication rec { 78 85 pname = "lutris-original"; 79 - version = "0.5.8.4"; 86 + version = "0.5.9.1"; 80 87 81 88 src = fetchFromGitHub { 82 89 owner = "lutris"; 83 90 repo = "lutris"; 84 91 rev = "v${version}"; 85 - sha256 = "sha256-5ivXIgDyM9PRvuUhPFPgziXDvggcL+p65kI2yOaiS1M="; 92 + sha256 = "sha256-ykPJneCKbFKv0x/EDo9PkRb1LkMeFeYzTDmvE3ShNe0="; 86 93 }; 87 94 88 95 nativeBuildInputs = [ wrapGAppsHook ]; ··· 111 118 python_magic 112 119 ]; 113 120 121 + checkInputs = [ xvfb-run nose flake8 ] ++ requiredTools; 122 + preCheck = "export HOME=$PWD"; 123 + checkPhase = '' 124 + runHook preCheck 125 + xvfb-run -s '-screen 0 800x600x24' make test 126 + runHook postCheck 127 + ''; 128 + 129 + # unhardcodes xrandr and fixes nosetests 130 + # upstream in progress: https://github.com/lutris/lutris/pull/3754 131 + patches = [ 132 + ./fixes.patch 133 + ]; 134 + 114 135 # avoid double wrapping 115 136 dontWrapGApps = true; 116 137 makeWrapperArgs = [ ··· 120 141 # needed for glib-schemas to work correctly (will crash on dialogues otherwise) 121 142 # see https://github.com/NixOS/nixpkgs/issues/56943 122 143 strictDeps = false; 123 - 124 - preCheck = "export HOME=$PWD"; 125 144 126 145 meta = with lib; { 127 146 homepage = "https://lutris.net";
+67
pkgs/applications/misc/lutris/fixes.patch
··· 1 + diff --git a/Makefile b/Makefile 2 + index 821a9500..75affa77 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -25,12 +25,12 @@ release: build-source upload upload-ppa 6 + 7 + test: 8 + rm tests/fixtures/pga.db -f 9 + - nosetests3 10 + + nosetests 11 + 12 + cover: 13 + rm tests/fixtures/pga.db -f 14 + rm tests/coverage/ -rf 15 + - nosetests3 --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage 16 + + nosetests --with-coverage --cover-package=lutris --cover-html --cover-html-dir=tests/coverage 17 + 18 + pgp-renew: 19 + osc signkey --extend home:strycore 20 + diff --git a/lutris/util/graphics/xrandr.py b/lutris/util/graphics/xrandr.py 21 + index f788c94c..5544dbe9 100644 22 + --- a/lutris/util/graphics/xrandr.py 23 + +++ b/lutris/util/graphics/xrandr.py 24 + @@ -5,6 +5,7 @@ from collections import namedtuple 25 + 26 + from lutris.util.log import logger 27 + from lutris.util.system import read_process_output 28 + +from lutris.util.linux import LINUX_SYSTEM 29 + 30 + Output = namedtuple("Output", ("name", "mode", "position", "rotation", "primary", "rate")) 31 + 32 + @@ -12,7 +13,7 @@ Output = namedtuple("Output", ("name", "mode", "position", "rotation", "primary" 33 + def _get_vidmodes(): 34 + """Return video modes from XrandR""" 35 + logger.debug("Retrieving video modes from XrandR") 36 + - return read_process_output(["xrandr"]).split("\n") 37 + + return read_process_output([LINUX_SYSTEM.get("xrandr")]).split("\n") 38 + 39 + 40 + def get_outputs(): # pylint: disable=too-many-locals 41 + @@ -76,7 +77,7 @@ def turn_off_except(display): 42 + for output in get_outputs(): 43 + if output.name != display: 44 + logger.info("Turning off %s", output[0]) 45 + - subprocess.Popen(["xrandr", "--output", output.name, "--off"]) 46 + + subprocess.Popen([LINUX_SYSTEM.get("xrandr"), "--output", output.name, "--off"]) 47 + 48 + 49 + def get_resolutions(): 50 + @@ -111,7 +112,7 @@ def change_resolution(resolution): 51 + logger.warning("Resolution %s doesn't exist.", resolution) 52 + else: 53 + logger.info("Changing resolution to %s", resolution) 54 + - subprocess.Popen(["xrandr", "-s", resolution]) 55 + + subprocess.Popen([LINUX_SYSTEM.get("xrandr"), "-s", resolution]) 56 + else: 57 + for display in resolution: 58 + logger.debug("Switching to %s on %s", display.mode, display.name) 59 + @@ -128,7 +129,7 @@ def change_resolution(resolution): 60 + logger.info("Switching resolution of %s to %s", display.name, display.mode) 61 + subprocess.Popen( 62 + [ 63 + - "xrandr", 64 + + LINUX_SYSTEM.get("xrandr"), 65 + "--output", 66 + display.name, 67 + "--mode",