lutris: 0.5.8.4 -> 0.5.9.1

I added a patch that unhardcodes calls to xrandr and fixes calls to nosetests.
I also added xvfb-run because the tests need to run with an X server.

wackbyte 53e7de91 10bcba09

+91 -5
+24 -5
pkgs/applications/misc/lutris/default.nix
··· 15 , webkitgtk 16 , wrapGAppsHook 17 18 # python dependencies 19 , dbus-python 20 , distro ··· 46 47 let 48 # See lutris/util/linux.py 49 - binPath = lib.makeBinPath [ 50 xrandr 51 pciutils 52 psmisc ··· 64 xorg.xkbcomp 65 ]; 66 67 gstDeps = with gst_all_1; [ 68 gst-libav 69 gst-plugins-bad ··· 76 in 77 buildPythonApplication rec { 78 pname = "lutris-original"; 79 - version = "0.5.8.4"; 80 81 src = fetchFromGitHub { 82 owner = "lutris"; 83 repo = "lutris"; 84 rev = "v${version}"; 85 - sha256 = "sha256-5ivXIgDyM9PRvuUhPFPgziXDvggcL+p65kI2yOaiS1M="; 86 }; 87 88 nativeBuildInputs = [ wrapGAppsHook ]; ··· 111 python_magic 112 ]; 113 114 # avoid double wrapping 115 dontWrapGApps = true; 116 makeWrapperArgs = [ ··· 120 # needed for glib-schemas to work correctly (will crash on dialogues otherwise) 121 # see https://github.com/NixOS/nixpkgs/issues/56943 122 strictDeps = false; 123 - 124 - preCheck = "export HOME=$PWD"; 125 126 meta = with lib; { 127 homepage = "https://lutris.net";
··· 15 , webkitgtk 16 , wrapGAppsHook 17 18 + # check inputs 19 + , xvfb-run 20 + , nose 21 + , flake8 22 + 23 # python dependencies 24 , dbus-python 25 , distro ··· 51 52 let 53 # See lutris/util/linux.py 54 + requiredTools = [ 55 xrandr 56 pciutils 57 psmisc ··· 69 xorg.xkbcomp 70 ]; 71 72 + binPath = lib.makeBinPath requiredTools; 73 + 74 gstDeps = with gst_all_1; [ 75 gst-libav 76 gst-plugins-bad ··· 83 in 84 buildPythonApplication rec { 85 pname = "lutris-original"; 86 + version = "0.5.9.1"; 87 88 src = fetchFromGitHub { 89 owner = "lutris"; 90 repo = "lutris"; 91 rev = "v${version}"; 92 + sha256 = "sha256-ykPJneCKbFKv0x/EDo9PkRb1LkMeFeYzTDmvE3ShNe0="; 93 }; 94 95 nativeBuildInputs = [ wrapGAppsHook ]; ··· 118 python_magic 119 ]; 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 + 135 # avoid double wrapping 136 dontWrapGApps = true; 137 makeWrapperArgs = [ ··· 141 # needed for glib-schemas to work correctly (will crash on dialogues otherwise) 142 # see https://github.com/NixOS/nixpkgs/issues/56943 143 strictDeps = false; 144 145 meta = with lib; { 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",