gmrun: if /etc/gmrunrc exists, prefer it over the copy we installed in $out

+19
+1
pkgs/applications/misc/gmrun/default.nix
··· 21 21 22 22 patches = [ 23 23 ./gcc43.patch 24 + ./find-config-file-in-system-etc-dir.patch 24 25 ./gmrun-0.9.2-xdg.patch 25 26 ]; 26 27
+18
pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch
··· 1 + diff -ur gmrun-0.9.2-orig/src/prefs.cc gmrun-0.9.2/src/prefs.cc 2 + --- gmrun-0.9.2-orig/src/prefs.cc 2019-05-02 12:56:39.025088361 +0200 3 + +++ gmrun-0.9.2/src/prefs.cc 2019-05-02 13:21:51.179778620 +0200 4 + @@ -31,9 +31,11 @@ 5 + 6 + Prefs::Prefs() 7 + { 8 + - string file_name = PACKAGE_DATA_DIR"/"; 9 + - file_name += GMRUNRC; 10 + - init(file_name); 11 + + string file_name = "/etc/" GMRUNRC; 12 + + if (!init(file_name)) { 13 + + file_name = PACKAGE_DATA_DIR "/" GMRUNRC;; 14 + + init(file_name); 15 + + } 16 + 17 + file_name = getenv("HOME"); 18 + if (!file_name.empty()) {