10 , gobject-introspection
11 , gsettings-desktop-schemas
18 , libappindicator-gtk3
33 customHunspell = hunspellWithDicts [
41 python3.pkgs.buildPythonApplication rec {
43 version = "${majorVersion}.1";
46 url = "https://launchpad.net/onboard/${majorVersion}/${version}/+download/${pname}-${version}.tar.gz";
47 sha256 = "0r9q38ikmr4in4dwqd8m9gh9xjbgxnfxglnjbfcapw8ybfnf3jh1";
52 src = ./fix-paths.patch;
55 # Allow loading hunspell dictionaries installed in NixOS system path
56 ./hunspell-use-xdg-datadirs.patch
70 gsettings-desktop-schemas
81 ] ++ lib.optional atspiSupport at-spi2-core;
83 pythonPath = with python3.pkgs; [
92 propagatedUserEnvPkgs = [
97 # for Onboard.SpellChecker.aspell_cmd doctests
98 (aspellWithDicts (dicts: with dicts; [ en ]))
100 # for Onboard.SpellChecker.hunspell_cmd doctests
103 # for Onboard.SpellChecker.hunspell doctests
111 # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
117 # Unnecessary file, has been removed upstream
118 # https://github.com/NixOS/nixpkgs/pull/24986#issuecomment-296114062
119 rm -r Onboard/pypredict/attic
121 substituteInPlace ./scripts/sokSettings.py \
122 --replace "#!/usr/bin/python3" "" \
123 --replace "PYTHON_EXECUTABLE," "\"$out/bin/onboard-settings\"" \
124 --replace '"-cfrom Onboard.settings import Settings\ns = Settings(False)"' ""
126 chmod -x ./scripts/sokSettings.py
130 substituteInPlace setup.py \
131 --replace "/etc" "$out/etc"
133 substituteInPlace ./Onboard/LanguageSupport.py \
134 --replace "/usr/share/xml/iso-codes" "${isocodes}/share/xml/iso-codes"
136 substituteInPlace ./Onboard/Indicator.py \
137 --replace "/usr/bin/yelp" "${yelp}/bin/yelp"
139 substituteInPlace ./gnome/Onboard_Indicator@onboard.org/extension.js \
140 --replace "/usr/bin/yelp" "${yelp}/bin/yelp"
142 substituteInPlace ./Onboard/SpellChecker.py \
143 --replace "/usr/lib" "$out/lib"
145 substituteInPlace ./data/org.onboard.Onboard.service \
146 --replace "/usr/bin" "$out/bin"
148 substituteInPlace ./Onboard/utils.py \
149 --replace "/usr/share" "$out/share"
150 substituteInPlace ./onboard-defaults.conf.example \
151 --replace "/usr/share" "$out/share"
152 substituteInPlace ./Onboard/Config.py \
153 --replace "/usr/share/onboard" "$out/share/onboard"
155 substituteInPlace ./Onboard/WordSuggestions.py \
156 --replace "/usr/bin" "$out/bin"
158 # killall is dangerous on non-gnu platforms. Use pkill instead.
159 substituteInPlace ./setup.py \
160 --replace '"killall",' '"${procps}/bin/pkill", "-x",'
164 ${python3.interpreter} setup.py install --prefix="$out"
166 cp onboard-default-settings.gschema.override.example $out/share/glib-2.0/schemas/10_onboard-default-settings.gschema.override
167 glib-compile-schemas $out/share/glib-2.0/schemas/
170 # Remove ubuntu icons.
172 rm -rf $out/share/icons/ubuntu-mono-*
176 homepage = "https://launchpad.net/onboard";
177 description = "Onscreen keyboard useful for tablet PC users and for mobility impaired users";
178 maintainers = with maintainers; [ johnramsden ];
179 license = licenses.gpl3;