uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
181
pkgs/applications/misc/onboard/default.nix
Normal file
181
pkgs/applications/misc/onboard/default.nix
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
{ fetchurl
|
||||
, lib
|
||||
, substituteAll
|
||||
, aspellWithDicts
|
||||
, at-spi2-core ? null
|
||||
, atspiSupport ? true
|
||||
, bash
|
||||
, glib
|
||||
, dconf
|
||||
, gobject-introspection
|
||||
, gsettings-desktop-schemas
|
||||
, gtk3
|
||||
, hunspell
|
||||
, hunspellDicts
|
||||
, hunspellWithDicts
|
||||
, intltool
|
||||
, isocodes
|
||||
, libappindicator-gtk3
|
||||
, libcanberra-gtk3
|
||||
, mousetweaks
|
||||
, udev
|
||||
, libxkbcommon
|
||||
, pkg-config
|
||||
, procps
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
, xorg
|
||||
, yelp
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
customHunspell = hunspellWithDicts [
|
||||
hunspellDicts.en-us
|
||||
];
|
||||
|
||||
majorVersion = "1.4";
|
||||
|
||||
in
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "onboard";
|
||||
version = "${majorVersion}.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launchpad.net/onboard/${majorVersion}/${version}/+download/${pname}-${version}.tar.gz";
|
||||
sha256 = "0r9q38ikmr4in4dwqd8m9gh9xjbgxnfxglnjbfcapw8ybfnf3jh1";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
inherit mousetweaks;
|
||||
})
|
||||
# Allow loading hunspell dictionaries installed in NixOS system path
|
||||
./hunspell-use-xdg-datadirs.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
intltool
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bash
|
||||
glib
|
||||
dconf
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
hunspell
|
||||
isocodes
|
||||
libappindicator-gtk3
|
||||
libcanberra-gtk3
|
||||
libxkbcommon
|
||||
mousetweaks
|
||||
udev
|
||||
xorg.libXtst
|
||||
xorg.libxkbfile
|
||||
] ++ lib.optional atspiSupport at-spi2-core;
|
||||
|
||||
pythonPath = with python3.pkgs; [
|
||||
dbus-python
|
||||
distutils_extra
|
||||
pyatspi
|
||||
pycairo
|
||||
pygobject3
|
||||
systemd
|
||||
];
|
||||
|
||||
propagatedUserEnvPkgs = [
|
||||
dconf
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
# for Onboard.SpellChecker.aspell_cmd doctests
|
||||
(aspellWithDicts (dicts: with dicts; [ en ]))
|
||||
|
||||
# for Onboard.SpellChecker.hunspell_cmd doctests
|
||||
customHunspell
|
||||
|
||||
# for Onboard.SpellChecker.hunspell doctests
|
||||
hunspellDicts.en-us
|
||||
hunspellDicts.es-es
|
||||
hunspellDicts.it-it
|
||||
|
||||
python3.pkgs.nose
|
||||
];
|
||||
|
||||
# Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
|
||||
strictDeps = false;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
preBuild = ''
|
||||
# Unnecessary file, has been removed upstream
|
||||
# https://github.com/NixOS/nixpkgs/pull/24986#issuecomment-296114062
|
||||
rm -r Onboard/pypredict/attic
|
||||
|
||||
substituteInPlace ./scripts/sokSettings.py \
|
||||
--replace "#!/usr/bin/python3" "" \
|
||||
--replace "PYTHON_EXECUTABLE," "\"$out/bin/onboard-settings\"" \
|
||||
--replace '"-cfrom Onboard.settings import Settings\ns = Settings(False)"' ""
|
||||
|
||||
chmod -x ./scripts/sokSettings.py
|
||||
|
||||
patchShebangs .
|
||||
|
||||
substituteInPlace setup.py \
|
||||
--replace "/etc" "$out/etc"
|
||||
|
||||
substituteInPlace ./Onboard/LanguageSupport.py \
|
||||
--replace "/usr/share/xml/iso-codes" "${isocodes}/share/xml/iso-codes"
|
||||
|
||||
substituteInPlace ./Onboard/Indicator.py \
|
||||
--replace "/usr/bin/yelp" "${yelp}/bin/yelp"
|
||||
|
||||
substituteInPlace ./gnome/Onboard_Indicator@onboard.org/extension.js \
|
||||
--replace "/usr/bin/yelp" "${yelp}/bin/yelp"
|
||||
|
||||
substituteInPlace ./Onboard/SpellChecker.py \
|
||||
--replace "/usr/lib" "$out/lib"
|
||||
|
||||
substituteInPlace ./data/org.onboard.Onboard.service \
|
||||
--replace "/usr/bin" "$out/bin"
|
||||
|
||||
substituteInPlace ./Onboard/utils.py \
|
||||
--replace "/usr/share" "$out/share"
|
||||
substituteInPlace ./onboard-defaults.conf.example \
|
||||
--replace "/usr/share" "$out/share"
|
||||
substituteInPlace ./Onboard/Config.py \
|
||||
--replace "/usr/share/onboard" "$out/share/onboard"
|
||||
|
||||
substituteInPlace ./Onboard/WordSuggestions.py \
|
||||
--replace "/usr/bin" "$out/bin"
|
||||
|
||||
# killall is dangerous on non-gnu platforms. Use pkill instead.
|
||||
substituteInPlace ./setup.py \
|
||||
--replace '"killall",' '"${procps}/bin/pkill", "-x",'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
${python3.interpreter} setup.py install --prefix="$out"
|
||||
|
||||
cp onboard-default-settings.gschema.override.example $out/share/glib-2.0/schemas/10_onboard-default-settings.gschema.override
|
||||
glib-compile-schemas $out/share/glib-2.0/schemas/
|
||||
'';
|
||||
|
||||
# Remove ubuntu icons.
|
||||
postFixup = ''
|
||||
rm -rf $out/share/icons/ubuntu-mono-*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://launchpad.net/onboard";
|
||||
description = "Onscreen keyboard useful for tablet PC users and for mobility impaired users";
|
||||
maintainers = with maintainers; [ johnramsden ];
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
11
pkgs/applications/misc/onboard/fix-paths.patch
Normal file
11
pkgs/applications/misc/onboard/fix-paths.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/Onboard/ClickSimulator.py
|
||||
+++ b/Onboard/ClickSimulator.py
|
||||
@@ -479,7 +479,7 @@ class CSMousetweaks(ConfigObject, ClickSimulator):
|
||||
self._daemon_running_notify_callbacks = []
|
||||
|
||||
def _launch_daemon(self, delay):
|
||||
- self.launcher.launch_delayed(["mousetweaks"], delay)
|
||||
+ self.launcher.launch_delayed(["@mousetweaks@/bin/mousetweaks"], delay)
|
||||
|
||||
def _set_connection(self, active):
|
||||
''' Update interface object, state and notify listeners '''
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/Onboard/SpellChecker.py b/Onboard/SpellChecker.py
|
||||
index 6a92757..46e755e 100644
|
||||
--- a/Onboard/SpellChecker.py
|
||||
+++ b/Onboard/SpellChecker.py
|
||||
@@ -506,6 +506,10 @@ class hunspell(SCBackend):
|
||||
if dicpath:
|
||||
paths.extend(dicpath.split(pathsep))
|
||||
|
||||
+ datadirs = os.getenv("XDG_DATA_DIRS")
|
||||
+ if datadirs:
|
||||
+ paths.extend(map(lambda datadir: os.path.join(datadir, 'hunspell'), datadirs.split(pathsep)))
|
||||
+
|
||||
paths.extend(LIBDIRS)
|
||||
|
||||
home = os.getenv("HOME")
|
||||
@@ -723,4 +727,3 @@ class aspell_cmd(SCBackend):
|
||||
_logger.error(_format("Failed to execute '{}', {}", \
|
||||
" ".join(args), e))
|
||||
return [id for id in dict_ids if id]
|
||||
-
|
||||
Loading…
Add table
Add a link
Reference in a new issue