1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00

makeQtWrapper, kdeWrapper: add GTK3 dependencies

This commit is contained in:
Nikolay Amiantov 2017-03-20 20:18:47 +03:00
parent 670744e1fa
commit a40b7d07e9
5 changed files with 23 additions and 10 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, lib, makeWrapper, buildEnv }:
{ stdenv, lib, makeWrapper, buildEnv, gtk3, dconf }:
packages:
@ -47,10 +47,11 @@ stdenv.mkDerivation {
--argv0 '"$0"' \
--suffix PATH : "$env/bin" \
--prefix XDG_CONFIG_DIRS : "$env/etc/xdg" \
--prefix XDG_DATA_DIRS : "$env/share" \
--prefix XDG_DATA_DIRS : "$env/share:${gtk3}/share/gsettings-schemas/${gtk3.name}" \
--set QML_IMPORT_PATH "$env/lib/qt5/imports" \
--set QML2_IMPORT_PATH "$env/lib/qt5/qml" \
--set QT_PLUGIN_PATH "$env/lib/qt5/plugins"
--set QT_PLUGIN_PATH "$env/lib/qt5/plugins" \
--prefix GIO_EXTRA_MODULES : "${dconf.lib}/lib/gio/modules"
good="1"
break
fi

View file

@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
gstreamer, gst-plugins-base,
gstreamer, gst-plugins-base, gtk3, dconf,
# options
developerBuild ? false,
@ -107,7 +107,7 @@ let
makeQtWrapper =
makeSetupHook
{ deps = [ makeWrapper ]; }
{ deps = [ makeWrapper dconf.lib gtk ]; }
(if stdenv.isDarwin then ../make-qt-wrapper-darwin.sh else ../make-qt-wrapper.sh);
qmakeHook =

View file

@ -18,7 +18,7 @@ top-level attribute to `top-level/all-packages.nix`.
newScope,
stdenv, fetchurl, makeSetupHook, makeWrapper,
bison, cups ? null, harfbuzz, mesa, perl,
gstreamer, gst-plugins-base,
gstreamer, gst-plugins-base, gtk3, dconf,
# options
developerBuild ? false,
@ -106,7 +106,7 @@ let
makeQtWrapper =
makeSetupHook
{ deps = [ makeWrapper ]; }
{ deps = [ makeWrapper dconf.lib gtk3 ]; }
../make-qt-wrapper.sh;
qmakeHook =

View file

@ -7,6 +7,7 @@ wrapQtProgram() {
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
--prefix GIO_EXTRA_MODULES : "$GIO_EXTRA_MODULES" \
"$@"
}
@ -21,6 +22,7 @@ makeQtWrapper() {
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
--prefix GIO_EXTRA_MODULES : "$GIO_EXTRA_MODULES" \
"$@"
}
@ -29,8 +31,16 @@ _makeQtWrapperSetup() {
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins"
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports"
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml"
export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share"
export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share${GSETTINGS_SCHEMAS_PATH:+:$GSETTINGS_SCHEMAS_PATH}"
export RUNTIME_XDG_CONFIG_DIRS="$RUNTIME_XDG_CONFIG_DIRS${RUNTIME_XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg"
}
prePhases+=(_makeQtWrapperSetup)
_findGioModules() {
if [ -d "$1"/lib/gio/modules ] && [ -n "$(ls -A $1/lib/gio/modules)" ] ; then
export GIO_EXTRA_MODULES="$GIO_EXTRA_MODULES${GIO_EXTRA_MODULES:+:}$1/lib/gio/modules"
fi
}
envHooks+=(_findGioModules)

View file

@ -271,8 +271,8 @@ with pkgs;
kdeDerivation = import ../build-support/kde/derivation.nix { inherit stdenv lib; };
kdeWrapper = import ../build-support/kde/wrapper.nix {
inherit stdenv lib makeWrapper buildEnv;
kdeWrapper = callPackage ../build-support/kde/wrapper.nix {
inherit (gnome3) dconf;
};
nixBufferBuilders = import ../build-support/emacs/buffer.nix { inherit (pkgs) lib writeText; inherit (emacsPackagesNg) inherit-local; };
@ -9454,6 +9454,7 @@ with pkgs;
mesa = mesa_noglu;
inherit perl;
inherit (gst_all_1) gstreamer gst-plugins-base;
inherit (gnome3) gtk3 dconf;
});
libsForQt57 = recurseIntoAttrs (lib.makeScope qt57.newScope mkLibsForQt5);
@ -9467,6 +9468,7 @@ with pkgs;
mesa = mesa_noglu;
inherit perl;
inherit (gst_all_1) gstreamer gst-plugins-base;
inherit (gnome3) gtk3 dconf;
});
libsForQt58 = recurseIntoAttrs (lib.makeScope qt58.newScope mkLibsForQt5);