diff options
author | Jiajie Chen <c@jia.je> | 2022-08-13 10:15:13 +0800 |
---|---|---|
committer | Jiajie Chen <c@jia.je> | 2022-10-28 11:06:57 +0800 |
commit | 4ed7e2a8669dda9cf6abac113264b563657c1949 (patch) | |
tree | ffd36cd13f7e061fa75532d3a4df4629e12922eb /pkgs/applications/search | |
parent | 498ebaf86df2a5fc4ec461acd6778b766528232d (diff) |
recoll: fix no/bad configuration error on darwin
Prior to this fix, running recoll fails with the following error: No/bad main configuration file in /nix/store/.../Resources/examples. The path is incorrect and RECOLL_DATADIR should be used.
Diffstat (limited to 'pkgs/applications/search')
-rw-r--r-- | pkgs/applications/search/recoll/default.nix | 7 | ||||
-rw-r--r-- | pkgs/applications/search/recoll/fix-datadir.patch | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 8d33a910546cd..4117c8ac78a98 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -46,6 +46,13 @@ mkDerivation rec { ++ lib.optionals (!withGui) [ "--disable-qtgui" "--disable-x11mon" ] ++ (if stdenv.isLinux then [ "--with-inotify" ] else [ "--without-inotify" ]); + NIX_CFLAGS_COMPILE = [ "-DNIXPKGS" ]; + + patches = [ + # fix "No/bad main configuration file" error + ./fix-datadir.patch + ]; + nativeBuildInputs = [ file pkg-config python3Packages.setuptools which ]; diff --git a/pkgs/applications/search/recoll/fix-datadir.patch b/pkgs/applications/search/recoll/fix-datadir.patch new file mode 100644 index 0000000000000..3b316f4d90c6e --- /dev/null +++ b/pkgs/applications/search/recoll/fix-datadir.patch @@ -0,0 +1,13 @@ +diff --git a/utils/rclutil.cpp b/utils/rclutil.cpp +index 60ff5fb..4a59ccc 100644 +--- a/utils/rclutil.cpp ++++ b/utils/rclutil.cpp +@@ -279,7 +279,7 @@ const string& path_pkgdatadir() + "a subfolder of the installation directory. \n" + "Please set the RECOLL_DATADIR environment variable to point to it\n" + "(e.g. setx RECOLL_DATADIR \"C:/Program Files (X86)/Recoll/Share)\"\n"; +-#elif defined(__APPLE__) && !defined(MACPORTS) && !defined(HOMEBREW) ++#elif defined(__APPLE__) && !defined(MACPORTS) && !defined(HOMEBREW) && !defined(NIXPKGS) + uint32_t size = 0; + _NSGetExecutablePath(nullptr, &size); + char *path= (char*)malloc(size+1); |