diff options
author | Peter Simons <simons@cryp.to> | 2019-05-02 13:29:07 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2019-05-02 13:30:58 +0200 |
commit | 676d292cefd8ea4f620dd6d16f571ff9d24f292d (patch) | |
tree | 77320d2700002876f85b73c8dd9bdcff018c2fdc /pkgs/applications/misc/gmrun | |
parent | 1dd5eeb0c76165e2c5bda33be7795ffa070e40e5 (diff) |
gmrun: if /etc/gmrunrc exists, prefer it over the copy we installed in $out
Diffstat (limited to 'pkgs/applications/misc/gmrun')
-rw-r--r-- | pkgs/applications/misc/gmrun/default.nix | 1 | ||||
-rw-r--r-- | pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gmrun/default.nix b/pkgs/applications/misc/gmrun/default.nix index 053da375ab152..47fb50242c1de 100644 --- a/pkgs/applications/misc/gmrun/default.nix +++ b/pkgs/applications/misc/gmrun/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { patches = [ ./gcc43.patch + ./find-config-file-in-system-etc-dir.patch ./gmrun-0.9.2-xdg.patch ]; diff --git a/pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch b/pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch new file mode 100644 index 0000000000000..12d5370961c01 --- /dev/null +++ b/pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch @@ -0,0 +1,18 @@ +diff -ur gmrun-0.9.2-orig/src/prefs.cc gmrun-0.9.2/src/prefs.cc +--- gmrun-0.9.2-orig/src/prefs.cc 2019-05-02 12:56:39.025088361 +0200 ++++ gmrun-0.9.2/src/prefs.cc 2019-05-02 13:21:51.179778620 +0200 +@@ -31,9 +31,11 @@ + + Prefs::Prefs() + { +- string file_name = PACKAGE_DATA_DIR"/"; +- file_name += GMRUNRC; +- init(file_name); ++ string file_name = "/etc/" GMRUNRC; ++ if (!init(file_name)) { ++ file_name = PACKAGE_DATA_DIR "/" GMRUNRC;; ++ init(file_name); ++ } + + file_name = getenv("HOME"); + if (!file_name.empty()) { |