orca: 45.2 → 46.1

https://gitlab.gnome.org/GNOME/orca/-/compare/ORCA_45_2...ORCA_46_1

Regenerated the fix-paths.patch by searching usages of `subprocess`.

Port to meson.

No more pyatspi.
https://github.com/GNOME/orca/commit/1c496c9ada82fdfd33c5be9bcddfdb76aca6c55b

Move to by-name and use pkgs.callPackage so we don't have to write another
`inherit (pkgs.buildPackages) meson;`.

Changelog-Reviewed-By: Maxine Aubrey <max@ine.dev>

authored by Bobby Rong and committed by Maxine Aubrey 5c70aa0b 7b2a4193

+92 -108
+17 -16
pkgs/applications/misc/orca/default.nix pkgs/by-name/or/orca/package.nix
··· 1 1 { lib 2 2 , pkg-config 3 3 , fetchurl 4 - , buildPythonApplication 5 - , autoreconfHook 4 + , meson 5 + , ninja 6 6 , wrapGAppsHook 7 7 , gobject-introspection 8 8 , gettext 9 9 , yelp-tools 10 10 , itstool 11 - , python 12 - , pygobject3 11 + , python3 13 12 , gtk3 14 13 , gnome 15 14 , substituteAll 16 15 , at-spi2-atk 17 16 , at-spi2-core 18 - , pyatspi 19 17 , dbus 20 - , dbus-python 21 - , pyxdg 22 18 , xkbcomp 23 19 , procps 24 20 , lsof ··· 27 23 , speechd 28 24 , brltty 29 25 , liblouis 30 - , setproctitle 31 26 , gst_all_1 32 - , gst-python 33 27 }: 34 28 35 - buildPythonApplication rec { 29 + python3.pkgs.buildPythonApplication rec { 36 30 pname = "orca"; 37 - version = "45.2"; 31 + version = "46.1"; 38 32 39 33 format = "other"; 40 34 41 35 src = fetchurl { 42 36 url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; 43 - sha256 = "8PLFeaW+7f5WU7x/4kSBxNaqxd0fccHnoghZXzx473Y="; 37 + hash = "sha256-z2deNQwYrA+ilDbGVZ0dqXX3///vqAjr5HbY+enRERQ="; 44 38 }; 45 39 46 40 patches = [ ··· 54 48 ]; 55 49 56 50 nativeBuildInputs = [ 57 - autoreconfHook 51 + meson 52 + ninja 58 53 wrapGAppsHook 59 54 pkg-config 60 55 gettext ··· 63 58 gobject-introspection 64 59 ]; 65 60 66 - pythonPath = [ 61 + pythonPath = with python3.pkgs; [ 67 62 pygobject3 68 - pyatspi 69 63 dbus-python 70 64 pyxdg 71 65 brltty 72 66 liblouis 67 + psutil 73 68 speechd 74 69 gst-python 75 70 setproctitle ··· 78 73 strictDeps = false; 79 74 80 75 buildInputs = [ 81 - python 76 + python3 82 77 gtk3 83 78 at-spi2-atk 84 79 at-spi2-core ··· 88 83 gst_all_1.gst-plugins-base 89 84 gst_all_1.gst-plugins-good 90 85 ]; 86 + 87 + dontWrapGApps = true; # Prevent double wrapping 88 + 89 + preFixup = '' 90 + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") 91 + ''; 91 92 92 93 passthru = { 93 94 updateScript = gnome.updateScript {
-88
pkgs/applications/misc/orca/fix-paths.patch
··· 1 - diff --git a/src/orca/debug.py b/src/orca/debug.py 2 - index b7e11ea60..9ab996765 100644 3 - --- a/src/orca/debug.py 4 - +++ b/src/orca/debug.py 5 - @@ -447,7 +447,7 @@ def traceit(frame, event, arg): 6 - return traceit 7 - 8 - def getOpenFDCount(pid): 9 - - procs = subprocess.check_output([ 'lsof', '-w', '-Ff', '-p', str(pid)]) 10 - + procs = subprocess.check_output([ '@lsof@', '-w', '-Ff', '-p', str(pid)]) 11 - procs = procs.decode('UTF-8').split('\n') 12 - files = list(filter(lambda s: s and s[0] == 'f' and s[1:].isdigit(), procs)) 13 - 14 - @@ -465,7 +465,7 @@ def getCmdline(pid): 15 - return cmdline 16 - 17 - def pidOf(procName): 18 - - openFile = subprocess.Popen(f'pgrep {procName}', 19 - + openFile = subprocess.Popen(f'@pgrep@ {procName}', 20 - shell=True, 21 - stdout=subprocess.PIPE).stdout 22 - pids = openFile.read() 23 - diff --git a/src/orca/orca.py b/src/orca/orca.py 24 - index d4e89f918..bb3e6cc1d 100644 25 - --- a/src/orca/orca.py 26 - +++ b/src/orca/orca.py 27 - @@ -312,7 +312,7 @@ def updateKeyMap(keyboardEvent): 28 - 29 - def _setXmodmap(xkbmap): 30 - """Set the keyboard map using xkbcomp.""" 31 - - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']], 32 - + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']], 33 - stdin=subprocess.PIPE, stdout=None, stderr=None) 34 - p.communicate(xkbmap) 35 - 36 - @@ -389,7 +389,7 @@ def _storeXmodmap(keyList): 37 - """ 38 - 39 - global _originalXmodmap 40 - - _originalXmodmap = subprocess.check_output(['xkbcomp', os.environ['DISPLAY'], '-']) 41 - + _originalXmodmap = subprocess.check_output(['@xkbcomp@', os.environ['DISPLAY'], '-']) 42 - 43 - def _restoreXmodmap(keyList=[]): 44 - """Restore the original xmodmap values for the keys in keyList. 45 - @@ -404,7 +404,7 @@ def _restoreXmodmap(keyList=[]): 46 - 47 - global _capsLockCleared 48 - _capsLockCleared = False 49 - - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']], 50 - + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']], 51 - stdin=subprocess.PIPE, stdout=None, stderr=None) 52 - p.communicate(_originalXmodmap) 53 - 54 - diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in 55 - index 9d64af948..ca9c9e083 100644 56 - --- a/src/orca/orca_bin.py.in 57 - +++ b/src/orca/orca_bin.py.in 58 - @@ -65,7 +65,7 @@ class ListApps(argparse.Action): 59 - name = "[DEAD]" 60 - 61 - try: 62 - - cmdline = subprocess.getoutput('cat /proc/%s/cmdline' % pid) 63 - + cmdline = subprocess.getoutput('@cat@ /proc/%s/cmdline' % pid) 64 - except Exception: 65 - cmdline = '(exception encountered)' 66 - else: 67 - @@ -198,7 +198,7 @@ def inGraphicalDesktop(): 68 - def otherOrcas(): 69 - """Returns the pid of any other instances of Orca owned by this user.""" 70 - 71 - - openFile = subprocess.Popen('pgrep -u %s -x orca' % os.getuid(), 72 - + openFile = subprocess.Popen('@pgrep@ -u %s -x orca' % os.getuid(), 73 - shell=True, 74 - stdout=subprocess.PIPE).stdout 75 - pids = openFile.read() 76 - diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py 77 - index ed8b155e4..0436cca42 100644 78 - --- a/src/orca/script_utilities.py 79 - +++ b/src/orca/script_utilities.py 80 - @@ -144,7 +144,7 @@ class Utilities: 81 - return "" 82 - 83 - try: 84 - - cmdline = subprocess.getoutput(f"cat /proc/{pid}/cmdline") 85 - + cmdline = subprocess.getoutput(f"@cat@ /proc/{pid}/cmdline") 86 - except Exception: 87 - return "" 88 -
+75
pkgs/by-name/or/orca/fix-paths.patch
··· 1 + diff --git a/src/orca/debug.py b/src/orca/debug.py 2 + index eb939a236..4e4db2e84 100644 3 + --- a/src/orca/debug.py 4 + +++ b/src/orca/debug.py 5 + @@ -522,7 +522,7 @@ def traceit(frame, event, arg): 6 + return traceit 7 + 8 + def getOpenFDCount(pid): 9 + - procs = subprocess.check_output([ 'lsof', '-w', '-Ff', '-p', str(pid)]) 10 + + procs = subprocess.check_output([ '@lsof@', '-w', '-Ff', '-p', str(pid)]) 11 + procs = procs.decode('UTF-8').split('\n') 12 + files = list(filter(lambda s: s and s[0] == 'f' and s[1:].isdigit(), procs)) 13 + 14 + @@ -540,7 +540,7 @@ def getCmdline(pid): 15 + return cmdline 16 + 17 + def pidOf(procName): 18 + - openFile = subprocess.Popen(f'pgrep {procName}', 19 + + openFile = subprocess.Popen(f'@pgrep@ {procName}', 20 + shell=True, 21 + stdout=subprocess.PIPE).stdout 22 + pids = openFile.read() 23 + diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in 24 + index c6f99de14..2370204f3 100755 25 + --- a/src/orca/orca_bin.py.in 26 + +++ b/src/orca/orca_bin.py.in 27 + @@ -62,7 +62,7 @@ class ListApps(argparse.Action): 28 + name = "[DEAD]" 29 + 30 + try: 31 + - cmdline = subprocess.getoutput('cat /proc/%s/cmdline' % pid) 32 + + cmdline = subprocess.getoutput('@cat@ /proc/%s/cmdline' % pid) 33 + except Exception: 34 + cmdline = '(exception encountered)' 35 + else: 36 + @@ -195,7 +195,7 @@ def inGraphicalDesktop(): 37 + def otherOrcas(): 38 + """Returns the pid of any other instances of Orca owned by this user.""" 39 + 40 + - openFile = subprocess.Popen('pgrep -u %s -x orca' % os.getuid(), 41 + + openFile = subprocess.Popen('@pgrep@ -u %s -x orca' % os.getuid(), 42 + shell=True, 43 + stdout=subprocess.PIPE).stdout 44 + pids = openFile.read() 45 + diff --git a/src/orca/orca_modifier_manager.py b/src/orca/orca_modifier_manager.py 46 + index c45cd4a5b..3f2ec59f0 100644 47 + --- a/src/orca/orca_modifier_manager.py 48 + +++ b/src/orca/orca_modifier_manager.py 49 + @@ -115,7 +115,7 @@ class OrcaModifierManager: 50 + debug.printMessage(debug.LEVEL_INFO, msg, True) 51 + 52 + self.unset_orca_modifiers(reason) 53 + - self._original_xmodmap = subprocess.check_output(['xkbcomp', os.environ['DISPLAY'], '-']) 54 + + self._original_xmodmap = subprocess.check_output(['@xkbcomp@', os.environ['DISPLAY'], '-']) 55 + self._create_orca_xmodmap() 56 + 57 + def update_key_map(self, keyboard_event): 58 + @@ -162,7 +162,7 @@ class OrcaModifierManager: 59 + return 60 + 61 + self._caps_lock_cleared = False 62 + - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']], 63 + + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']], 64 + stdin=subprocess.PIPE, stdout=None, stderr=None) 65 + p.communicate(self._original_xmodmap) 66 + 67 + @@ -223,7 +223,7 @@ class OrcaModifierManager: 68 + if modified: 69 + msg = "ORCA MODIFIER MANAGER: Updating xmodmap" 70 + debug.printMessage(debug.LEVEL_INFO, msg, True) 71 + - p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']], 72 + + p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']], 73 + stdin=subprocess.PIPE, stdout=None, stderr=None) 74 + p.communicate(bytes('\n'.join(lines), 'UTF-8')) 75 + else:
-4
pkgs/top-level/all-packages.nix
··· 33748 33748 33749 33749 oranda = callPackage ../applications/misc/oranda { }; 33750 33750 33751 - orca = python3Packages.callPackage ../applications/misc/orca { 33752 - inherit pkg-config; 33753 - }; 33754 - 33755 33751 orca-c = callPackage ../applications/audio/orca-c { }; 33756 33752 33757 33753 organicmaps = qt6Packages.callPackage ../applications/misc/organicmaps { };