11 , gobject-introspection
12 , gsettings-desktop-schemas
19 , libappindicator-gtk3
34 customHunspell = hunspellWithDicts [
42 python3.pkgs.buildPythonApplication rec {
44 version = "${majorVersion}.1";
47 url = "https://launchpad.net/onboard/${majorVersion}/${version}/+download/${pname}-${version}.tar.gz";
48 sha256 = "0r9q38ikmr4in4dwqd8m9gh9xjbgxnfxglnjbfcapw8ybfnf3jh1";
53 src = ./fix-paths.patch;
56 # Allow loading hunspell dictionaries installed in NixOS system path
57 ./hunspell-use-xdg-datadirs.patch
59 # Python 3.12 fixes (otherwise crashes at startup)
61 url = "https://github.com/void-linux/void-packages/raw/1be95325d320122efd5dedf7437839cfcca01f7a/srcpkgs/onboard/patches/python-3.12.patch";
62 hash = "sha256-Lw5wlaWFlP5rFlEWmlPo5Ux8idrmhET/X9yiu+2Akkk=";
65 url = "https://github.com/void-linux/void-packages/raw/1be95325d320122efd5dedf7437839cfcca01f7a/srcpkgs/onboard/patches/thread-state.patch";
66 hash = "sha256-fJfxD7HshroiEVkaKVBGV7py8tdOhbcprcmBQNuxR9U=";
69 # Fix for https://bugs.launchpad.net/onboard/+bug/1948723
71 url = "https://github.com/void-linux/void-packages/raw/9ef46bf26ac5acc1af5809f11c97b19c5e2233ed/srcpkgs/onboard/patches/fix-brokenformat.patch";
72 hash = "sha256-r9mvJNWpPR1gsayuSSLpzIuafEKqtADYklre0Ju+KOM=";
87 gsettings-desktop-schemas
98 ] ++ lib.optional atspiSupport at-spi2-core;
100 pythonPath = with python3.pkgs; [
109 propagatedUserEnvPkgs = [
113 nativeCheckInputs = [
114 # for Onboard.SpellChecker.aspell_cmd doctests
115 (aspellWithDicts (dicts: with dicts; [ en ]))
117 # for Onboard.SpellChecker.hunspell_cmd doctests
120 # for Onboard.SpellChecker.hunspell doctests
126 # Tests have never been enabled, and upstream uses nose as a test
127 # runner (though not as a library).
131 # Unnecessary file, has been removed upstream
132 # https://github.com/NixOS/nixpkgs/pull/24986#issuecomment-296114062
133 rm -r Onboard/pypredict/attic
135 substituteInPlace ./scripts/sokSettings.py \
136 --replace "#!/usr/bin/python3" "" \
137 --replace "PYTHON_EXECUTABLE," "\"$out/bin/onboard-settings\"" \
138 --replace '"-cfrom Onboard.settings import Settings\ns = Settings(False)"' ""
140 chmod -x ./scripts/sokSettings.py
144 substituteInPlace setup.py \
145 --replace "/etc" "$out/etc"
147 substituteInPlace ./Onboard/LanguageSupport.py \
148 --replace "/usr/share/xml/iso-codes" "${isocodes}/share/xml/iso-codes"
150 substituteInPlace ./Onboard/Indicator.py \
151 --replace "/usr/bin/yelp" "${yelp}/bin/yelp"
153 substituteInPlace ./gnome/Onboard_Indicator@onboard.org/extension.js \
154 --replace "/usr/bin/yelp" "${yelp}/bin/yelp"
156 substituteInPlace ./Onboard/SpellChecker.py \
157 --replace "/usr/lib" "$out/lib"
159 substituteInPlace ./data/org.onboard.Onboard.service \
160 --replace "/usr/bin" "$out/bin"
162 substituteInPlace ./Onboard/utils.py \
163 --replace "/usr/share" "$out/share"
164 substituteInPlace ./onboard-defaults.conf.example \
165 --replace "/usr/share" "$out/share"
166 substituteInPlace ./Onboard/Config.py \
167 --replace "/usr/share/onboard" "$out/share/onboard"
169 substituteInPlace ./Onboard/WordSuggestions.py \
170 --replace "/usr/bin" "$out/bin"
172 # killall is dangerous on non-gnu platforms. Use pkill instead.
173 substituteInPlace ./setup.py \
174 --replace '"killall",' '"${procps}/bin/pkill", "-x",'
177 # setuptools to get distutils with python 3.12
179 ${(python3.withPackages (p: [ p.setuptools ])).interpreter} setup.py install --prefix="$out"
181 cp onboard-default-settings.gschema.override.example $out/share/glib-2.0/schemas/10_onboard-default-settings.gschema.override
182 glib-compile-schemas $out/share/glib-2.0/schemas/
185 # Remove ubuntu icons.
187 rm -rf $out/share/icons/ubuntu-mono-*
191 homepage = "https://launchpad.net/onboard";
192 description = "Onscreen keyboard useful for tablet PC users and for mobility impaired users";
193 maintainers = with maintainers; [ johnramsden ];
194 license = licenses.gpl3;