about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-08-22 13:47:37 +0000
committerAlyssa Ross <hi@alyssa.is>2019-08-22 18:22:22 +0000
commit1b9a13c4689af7e088eb7af5589f8c811282846a (patch)
tree3ed032953008280fb94ef894c869ff3e2a2f7865 /nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
parent4999a38db7c5de0ea9f514a12ecd4133cce647f3 (diff)
parent1412af4b2cfae71d447164097d960d426e9752c0 (diff)
downloadnixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar.gz
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar.bz2
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar.lz
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar.xz
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.tar.zst
nixlib-1b9a13c4689af7e088eb7af5589f8c811282846a.zip
Merge remote-tracking branch 'channels/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch b/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
new file mode 100644
index 000000000000..4607f8b8ee09
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/hunspell/0001-Make-hunspell-look-in-XDG_DATA_DIRS-for-dictionaries.patch
@@ -0,0 +1,37 @@
+From 8c67f314de2684d77315eecd99ef091d441f17dd Mon Sep 17 00:00:00 2001
+From: Matthew Bauer <mjbauer95@gmail.com>
+Date: Wed, 24 Jul 2019 15:35:18 -0400
+Subject: [PATCH] Make hunspell look in XDG_DATA_DIRS for dictionaries
+
+Some dictionaries may exist but only show up under XDG_DATA_DIRS. For
+instance, $HOME/.local/share/hunspell could contain some dictionaries.
+
+This patch adds each directory in the hunspell subdir of each
+XDG_DATA_DIRS to the lookup path.
+
+Upstream pr is available at: https://github.com/hunspell/hunspell/pull/637
+---
+ src/tools/hunspell.cxx | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx
+index 690e34a..6cd127e 100644
+--- a/src/tools/hunspell.cxx
++++ b/src/tools/hunspell.cxx
+@@ -2044,6 +2044,13 @@ int main(int argc, char** argv) {
+     if (getenv("DICPATH")) {
+       path_std_str.append(getenv("DICPATH")).append(PATHSEP);
+     }
++    if (getenv("XDG_DATA_DIRS")) {
++      char* dir = strtok(getenv("XDG_DATA_DIRS"), ":");
++      while (dir != NULL) {
++        path_std_str.append(dir).append("/hunspell:");
++        dir = strtok(NULL, ":");
++      }
++    }
+     path_std_str.append(LIBDIR).append(PATHSEP);
+     if (HOME) {
+       const char * userooodir[] = USEROOODIR;
+-- 
+2.22.0
+