ocrfeeder: Fix launch with patch (#179675)

authored by

Doron Behar and committed by
GitHub
9c544193 ade5a53c

+18 -2
+5 -2
pkgs/applications/graphics/ocrfeeder/default.nix
··· 48 pygobject3 49 ])) 50 ]; 51 52 enginesPath = lib.makeBinPath ([ 53 tesseract4 ··· 64 maintainers = with maintainers; [ doronbehar ]; 65 license = licenses.gpl3Plus; 66 platforms = platforms.linux; 67 - # Compiles, but doesn't launch, see: https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/83 68 - broken = true; 69 }; 70 }
··· 48 pygobject3 49 ])) 50 ]; 51 + patches = [ 52 + # Compiles, but doesn't launch without this, see: 53 + # https://gitlab.gnome.org/GNOME/ocrfeeder/-/issues/83 54 + ./fix-launch.diff 55 + ]; 56 57 enginesPath = lib.makeBinPath ([ 58 tesseract4 ··· 69 maintainers = with maintainers; [ doronbehar ]; 70 license = licenses.gpl3Plus; 71 platforms = platforms.linux; 72 }; 73 }
+13
pkgs/applications/graphics/ocrfeeder/fix-launch.diff
···
··· 1 + diff --git i/src/ocrfeeder/studio/studioBuilder.py w/src/ocrfeeder/studio/studioBuilder.py 2 + index 7a2ccdc..7af19d9 100644 3 + --- i/src/ocrfeeder/studio/studioBuilder.py 4 + +++ w/src/ocrfeeder/studio/studioBuilder.py 5 + @@ -144,7 +144,7 @@ class Studio: 6 + if not self.ocr_engines: 7 + engines = self.configuration_manager.getEnginesInSystem() 8 + if engines: 9 + - add_engines_dialog = widgetPresenter.SystemEnginesDialog(engines) 10 + + add_engines_dialog = widgetPresenter.SystemEnginesDialog(self.main_window, engines) 11 + response = add_engines_dialog.run() 12 + if response == Gtk.ResponseType.ACCEPT: 13 + for engine in add_engines_dialog.getChosenEngines():