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
183
pkgs/tools/inputmethods/ibus/default.nix
Normal file
183
pkgs/tools/inputmethods/ibus/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ lib, stdenv
|
||||
, substituteAll
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, gettext
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, vala
|
||||
, wrapGAppsHook
|
||||
, dbus
|
||||
, systemd
|
||||
, dconf ? null
|
||||
, glib
|
||||
, gdk-pixbuf
|
||||
, gobject-introspection
|
||||
, gtk2
|
||||
, gtk3
|
||||
, gtk4
|
||||
, gtk-doc
|
||||
, runCommand
|
||||
, isocodes
|
||||
, cldr-annotations
|
||||
, unicode-character-database
|
||||
, unicode-emoji
|
||||
, python3
|
||||
, json-glib
|
||||
, libnotify ? null
|
||||
, enableUI ? true
|
||||
, withWayland ? false
|
||||
, libxkbcommon ? null
|
||||
, wayland ? null
|
||||
, buildPackages
|
||||
, runtimeShell
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
assert withWayland -> wayland != null && libxkbcommon != null;
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
|
||||
python3BuildEnv = python3.buildEnv.override {
|
||||
# ImportError: No module named site
|
||||
postBuild = ''
|
||||
makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --unset PYTHONPATH
|
||||
makeWrapper ${glib.dev}/bin/glib-genmarshal $out/bin/glib-genmarshal --unset PYTHONPATH
|
||||
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
|
||||
'';
|
||||
};
|
||||
# make-dconf-override-db.sh needs to execute dbus-launch in the sandbox,
|
||||
# it will fail to read /etc/dbus-1/session.conf unless we add this flag
|
||||
dbus-launch = runCommand "sandbox-dbus-launch" {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
} ''
|
||||
makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \
|
||||
--add-flags --config-file=${dbus.daemon}/share/dbus-1/session.conf
|
||||
'';
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ibus";
|
||||
version = "1.5.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ibus";
|
||||
repo = "ibus";
|
||||
rev = version;
|
||||
sha256 = "7Vuj4Gyd+dLUoCkR4SPkfGPwVQPRo2pHk0pRAsmtjxc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes systemd unit installation path https://github.com/ibus/ibus/pull/2388
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ibus/ibus/commit/33b4b3932bfea476a841f8df99e20049b83f4b0e.patch";
|
||||
sha256 = "kh8SBR+cqsov/B0A2YXLJVq1F171qoSRUKbBPHjPRHI=";
|
||||
})
|
||||
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
pythonInterpreter = python3Runtime.interpreter;
|
||||
pythonSitePackages = python3.sitePackages;
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" "installedTests" ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build data/dconf/make-dconf-override-db.sh
|
||||
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
||||
'';
|
||||
|
||||
preAutoreconf = "touch ChangeLog";
|
||||
|
||||
configureFlags = [
|
||||
"--disable-memconf"
|
||||
(enableFeature (dconf != null) "dconf")
|
||||
(enableFeature (libnotify != null) "libnotify")
|
||||
(enableFeature withWayland "wayland")
|
||||
(enableFeature enableUI "ui")
|
||||
"--enable-gtk4"
|
||||
"--enable-install-tests"
|
||||
"--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
|
||||
"--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
|
||||
"--with-ucd-dir=${unicode-character-database}/share/unicode"
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"test_execsdir=${placeholder "installedTests"}/libexec/installed-tests/ibus"
|
||||
"test_sourcesdir=${placeholder "installedTests"}/share/installed-tests/ibus"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
gtk-doc
|
||||
gettext
|
||||
makeWrapper
|
||||
pkg-config
|
||||
python3BuildEnv
|
||||
vala
|
||||
wrapGAppsHook
|
||||
dbus-launch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
glib
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
systemd
|
||||
dconf
|
||||
gdk-pixbuf
|
||||
gobject-introspection
|
||||
python3.pkgs.pygobject3 # for pygobject overrides
|
||||
gtk2
|
||||
gtk3
|
||||
gtk4
|
||||
isocodes
|
||||
json-glib
|
||||
libnotify
|
||||
] ++ optionals withWayland [
|
||||
libxkbcommon
|
||||
wayland
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = false; # requires X11 daemon
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/ibus version
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# It has some hardcoded FHS paths and also we do not use it
|
||||
# since we set up the environment in NixOS tests anyway.
|
||||
moveToOutput "bin/ibus-desktop-testing-runner" "$installedTests"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# set necessary environment also for tests
|
||||
for f in $installedTests/libexec/installed-tests/ibus/*; do
|
||||
wrapGApp $f
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
installed-tests = nixosTests.installed-tests.ibus;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/ibus/ibus";
|
||||
description = "Intelligent Input Bus, input method framework";
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ttuegel yana ];
|
||||
};
|
||||
}
|
||||
51
pkgs/tools/inputmethods/ibus/fix-paths.patch
Normal file
51
pkgs/tools/inputmethods/ibus/fix-paths.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index a3cdb2da..cade9466 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -469,11 +469,11 @@ PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
|
||||
if test "x$enable_pygobject" = "xyes"; then
|
||||
PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
|
||||
|
||||
- pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
|
||||
+ pyoverridesdir="$prefix/@pythonSitePackages@/gi/overrides"
|
||||
AC_SUBST(pyoverridesdir)
|
||||
|
||||
if test x"$enable_python2" = x"yes"; then
|
||||
- py2overridesdir=`$PYTHON2 -c "import gi; print(gi._overridesdir)"`
|
||||
+ py2overridesdir="$prefix/@pythonSitePackages@/gi/overrides"
|
||||
AC_SUBST(py2overridesdir)
|
||||
fi
|
||||
fi
|
||||
@@ -502,7 +502,7 @@ if test x"$enable_python_library" = x"yes"; then
|
||||
PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
|
||||
PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
|
||||
python2dir="$PYTHON2_LIBDIR/site-packages"
|
||||
- pkgpython2dir="$python2dir/ibus"
|
||||
+ pkgpython2dir="$prefix/@pythonSitePackages@/ibus"
|
||||
AC_SUBST(pkgpython2dir)
|
||||
else
|
||||
enable_python_library="no (disabled, use --enable-python-library to enable)"
|
||||
diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am
|
||||
index 5360f033..6d5e726f 100644
|
||||
--- a/data/dconf/Makefile.am
|
||||
+++ b/data/dconf/Makefile.am
|
||||
@@ -50,7 +50,7 @@ man_5dir = $(mandir)/man5
|
||||
|
||||
install-data-hook:
|
||||
if test -z "$(DESTDIR)"; then \
|
||||
- dconf update; \
|
||||
+ true; \
|
||||
fi
|
||||
|
||||
EXTRA_DIST = \
|
||||
diff --git a/setup/ibus-setup.in b/setup/ibus-setup.in
|
||||
index 474ce8a8..ee30808e 100644
|
||||
--- a/setup/ibus-setup.in
|
||||
+++ b/setup/ibus-setup.in
|
||||
@@ -27,5 +27,5 @@ export IBUS_PREFIX=@prefix@
|
||||
export IBUS_DATAROOTDIR=@datarootdir@
|
||||
export IBUS_LOCALEDIR=@localedir@
|
||||
export IBUS_LIBEXECDIR=${libexecdir}
|
||||
-exec ${PYTHON:-@PYTHON@} @prefix@/share/ibus/setup/main.py "$@"
|
||||
+exec @pythonInterpreter@ @prefix@/share/ibus/setup/main.py "$@"
|
||||
|
||||
24
pkgs/tools/inputmethods/ibus/ibus-qt.nix
Normal file
24
pkgs/tools/inputmethods/ibus/ibus-qt.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchurl, ibus, cmake, pkg-config, qt4, icu, doxygen }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ibus-qt";
|
||||
version = "1.3.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ibus/ibus-qt/releases/download/${version}/${pname}-${version}-Source.tar.gz";
|
||||
sha256 = "1q9g7qghpcf07valc2ni7yf994xqx2pmdffknj7scxfidav6p19g";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config doxygen ];
|
||||
buildInputs = [ ibus qt4 icu ];
|
||||
|
||||
cmakeFlags = [ "-DQT_PLUGINS_DIR=lib/qt4/plugins" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ibus/ibus-qt/";
|
||||
description = "Qt4 interface to the ibus input method";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
};
|
||||
}
|
||||
64
pkgs/tools/inputmethods/ibus/wrapper.nix
Normal file
64
pkgs/tools/inputmethods/ibus/wrapper.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, runCommand, makeWrapper, lndir
|
||||
, dconf, hicolor-icon-theme, ibus, librsvg, plugins ? []
|
||||
}:
|
||||
|
||||
let
|
||||
name = "ibus-with-plugins-" + lib.getVersion ibus;
|
||||
env = {
|
||||
buildInputs = [ ibus ] ++ plugins;
|
||||
nativeBuildInputs = [ lndir makeWrapper ];
|
||||
propagatedUserEnvPackages = [ hicolor-icon-theme ];
|
||||
paths = [ ibus ] ++ plugins;
|
||||
inherit (ibus) meta;
|
||||
};
|
||||
command = ''
|
||||
for dir in bin etc lib libexec share; do
|
||||
mkdir -p "$out/$dir"
|
||||
for pkg in $paths; do
|
||||
if [ -d "$pkg/$dir" ]; then
|
||||
lndir -silent "$pkg/$dir" "$out/$dir"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
for prog in ibus; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
|
||||
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
|
||||
--set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
|
||||
--set IBUS_DATAROOTDIR "$out/share" \
|
||||
--set IBUS_LIBEXECDIR "$out/libexec" \
|
||||
--set IBUS_LOCALEDIR "$out/share/locale" \
|
||||
--set IBUS_PREFIX "$out" \
|
||||
--set IBUS_TABLE_BIN_PATH "$out/bin" \
|
||||
--set IBUS_TABLE_DATA_DIR "$out/share" \
|
||||
--set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
|
||||
--set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"
|
||||
done
|
||||
|
||||
for prog in ibus-daemon; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
|
||||
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
|
||||
--set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
|
||||
--set IBUS_DATAROOTDIR "$out/share" \
|
||||
--set IBUS_LIBEXECDIR "$out/libexec" \
|
||||
--set IBUS_LOCALEDIR "$out/share/locale" \
|
||||
--set IBUS_PREFIX "$out" \
|
||||
--set IBUS_TABLE_BIN_PATH "$out/bin" \
|
||||
--set IBUS_TABLE_DATA_DIR "$out/share" \
|
||||
--set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
|
||||
--set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
||||
--add-flags "--cache=refresh"
|
||||
done
|
||||
'';
|
||||
in
|
||||
runCommand name env command
|
||||
Loading…
Add table
Add a link
Reference in a new issue