deepin: use qt5.mkDerivation where needed, cleanup wrappers

This switches a majority of the applications to using qt5.mkDerivation
which automatically adds wrapQtAppsHook.

In certain places, where GLib and gtk intersect with Qt, we
also needed to use wrapGAppsHook. In these cases there will
be multiple wrappers.
This commit is contained in:
worldofpeace 2019-07-21 22:53:18 -04:00
parent 2b350d16ef
commit 735199a210
25 changed files with 57 additions and 55 deletions

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, qttools, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, qttools,
deepin-gettext-tools, dtkcore, dtkwidget, deepin deepin-gettext-tools, dtkcore, dtkwidget, deepin
}: }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-calendar"; pname = "dde-calendar";
version = "1.2.10"; version = "1.2.10";

View File

@ -1,12 +1,12 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, deepin, qttools, qtdeclarative, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, deepin, qttools, qtdeclarative,
networkmanager, qtsvg, qtx11extras, dtkcore, dtkwidget, geoip, gsettings-qt, networkmanager, qtsvg, qtx11extras, dtkcore, dtkwidget, geoip, gsettings-qt,
dde-network-utils, networkmanager-qt, xorg, mtdev, fontconfig, freetype, dde-api, dde-network-utils, networkmanager-qt, xorg, mtdev, fontconfig, freetype, dde-api,
dde-daemon, qt5integration, deepin-desktop-base, deepin-desktop-schemas, dbus, dde-daemon, qt5integration, deepin-desktop-base, deepin-desktop-schemas, dbus,
systemd, dde-qt-dbus-factory, qtmultimedia, qtbase, glib, gnome3, which, systemd, dde-qt-dbus-factory, qtmultimedia, qtbase, glib, gnome3, which,
substituteAll, wrapGAppsHook, tzdata substituteAll, tzdata, wrapGAppsHook
}: }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-control-center"; pname = "dde-control-center";
version = "4.10.11"; version = "4.10.11";

View File

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, qttools, qtx11extras, { stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qttools, qtx11extras,
qtsvg, libsForQt5, polkit, gsettings-qt, dtkcore, dtkwidget, qtsvg, polkit, gsettings-qt, dtkcore, dtkwidget,
dde-qt-dbus-factory, dde-network-utils, dde-daemon, dde-qt-dbus-factory, dde-network-utils, dde-daemon,
deepin-desktop-schemas, xorg, glib, wrapGAppsHook, deepin, deepin-desktop-schemas, xorg, glib, wrapGAppsHook, deepin,
plugins ? [], symlinkJoin, makeWrapper }: plugins ? [], symlinkJoin, makeWrapper, libdbusmenu }:
let let
unwrapped = stdenv.mkDerivation rec { unwrapped = mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-dock"; pname = "dde-dock";
version = "4.10.3"; version = "4.10.3";
@ -34,7 +34,7 @@ unwrapped = stdenv.mkDerivation rec {
dtkwidget dtkwidget
glib.bin glib.bin
gsettings-qt gsettings-qt
libsForQt5.libdbusmenu libdbusmenu
polkit polkit
qtsvg qtsvg
qtx11extras qtx11extras

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, avfs, dde-daemon, dde-dock, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, avfs, dde-daemon, dde-dock,
dde-polkit-agent, dde-qt-dbus-factory, deepin, deepin-anything, dde-polkit-agent, dde-qt-dbus-factory, deepin, deepin-anything,
deepin-desktop-schemas, deepin-gettext-tools, deepin-movie-reborn, deepin-desktop-schemas, deepin-gettext-tools, deepin-movie-reborn,
deepin-shortcut-viewer, deepin-terminal, dtkcore, dtkwidget, deepin-shortcut-viewer, deepin-terminal, dtkcore, dtkwidget,
@ -8,7 +8,7 @@
qtx11extras, runtimeShell, samba, shadow, taglib, udisks2-qt5, qtx11extras, runtimeShell, samba, shadow, taglib, udisks2-qt5,
xdg-user-dirs, xorg, zlib, wrapGAppsHook }: xdg-user-dirs, xorg, zlib, wrapGAppsHook }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-file-manager"; pname = "dde-file-manager";
version = "4.8.6.4"; version = "4.8.6.4";

View File

@ -1,9 +1,9 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, dde-qt-dbus-factory, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, dde-qt-dbus-factory,
dde-session-ui, deepin, deepin-desktop-schemas, deepin-wallpapers, dde-session-ui, deepin, deepin-desktop-schemas, deepin-wallpapers,
dtkcore, dtkwidget, gsettings-qt, qtsvg, qttools, qtx11extras, dtkcore, dtkwidget, gsettings-qt, qtsvg, qttools, qtx11extras,
which, xdg_utils, wrapGAppsHook }: which, xdg_utils, wrapGAppsHook }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-launcher"; pname = "dde-launcher";
version = "4.6.13"; version = "4.6.13";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, substituteAll, qmake, pkgconfig, qttools, { stdenv, mkDerivation, fetchFromGitHub, substituteAll, qmake, pkgconfig, qttools,
dde-qt-dbus-factory, proxychains, which, deepin }: dde-qt-dbus-factory, proxychains, which, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-network-utils"; pname = "dde-network-utils";
version = "0.1.4"; version = "0.1.4";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qttools, polkit-qt, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qttools, polkit-qt,
dtkcore, dtkwidget, dde-qt-dbus-factory, deepin }: dtkcore, dtkwidget, dde-qt-dbus-factory, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-polkit-agent"; pname = "dde-polkit-agent";
version = "0.2.10"; version = "0.2.10";

View File

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, dbus, dde-daemon, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, dbus, dde-daemon,
dde-qt-dbus-factory, deepin, deepin-desktop-schemas, dde-qt-dbus-factory, deepin, deepin-desktop-schemas,
deepin-gettext-tools, deepin-icon-theme, deepin-wallpapers, dtkcore, deepin-gettext-tools, deepin-icon-theme, deepin-wallpapers, dtkcore,
dtkwidget, gnugrep, gsettings-qt, hicolor-icon-theme, lightdm_qt, dtkwidget, gnugrep, gsettings-qt, hicolor-icon-theme, lightdm_qt,
onboard, qtsvg, qttools, qtx11extras, setxkbmap, utillinux, which, onboard, qtsvg, qttools, qtx11extras, setxkbmap, utillinux, which,
xkeyboard_config, xorg, xrandr, wrapGAppsHook }: xkeyboard_config, xorg, xrandr, wrapGAppsHook }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dde-session-ui"; pname = "dde-session-ui";
version = "4.9.12"; version = "4.9.12";
@ -109,7 +109,7 @@ stdenv.mkDerivation rec {
postFixup = '' postFixup = ''
# wrapGAppsHook does not work with binaries outside of $out/bin or $out/libexec # wrapGAppsHook does not work with binaries outside of $out/bin or $out/libexec
for binary in $out/lib/deepin-daemon/*; do for binary in $out/lib/deepin-daemon/*; do
wrapProgram $binary "''${gappsWrapperArgs[@]}" wrapProgram $binary "''${qtWrapperArgs[@]}"
done done
searchHardCodedPaths $out # debugging searchHardCodedPaths $out # debugging

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qtbase, udisks2-qt5, utillinux, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qtbase, udisks2-qt5, utillinux,
dtkcore, deepin }: dtkcore, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-anything"; pname = "deepin-anything";
version = "0.1.0"; version = "0.1.0";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qttools, qtsvg, dtkcore, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qttools, qtsvg, dtkcore,
dtkwidget, deepin }: dtkwidget, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-calculator"; pname = "deepin-calculator";
version = "1.0.11"; version = "1.0.11";
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
postFixup = '' postFixup = ''
searchHardCodedPaths $out # debugging searchHardCodedPaths $out # debugging
''; '';
passthru.updateScript = deepin.updateScript { inherit name; }; passthru.updateScript = deepin.updateScript { inherit name; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,9 +1,9 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qttools, qtsvg, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qttools, qtsvg,
qtx11extras, dtkcore, dtkwidget, qt5integration, freeimage, libraw, qtx11extras, dtkcore, dtkwidget, qt5integration, freeimage, libraw,
libexif, deepin libexif, deepin
}: }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-image-viewer"; pname = "deepin-image-viewer";
version = "1.3.17"; version = "1.3.17";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, dtkcore, dtkwidget, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, dtkcore, dtkwidget,
qt5integration, deepin }: qt5integration, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-menu"; pname = "deepin-menu";
version = "3.4.8"; version = "3.4.8";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, glib, { stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, glib,
gtk3, libgtop, bamf, json-glib, libcanberra-gtk3, libxkbcommon, gtk3, libgtop, bamf, json-glib, libcanberra-gtk3, libxkbcommon,
libstartup_notification, deepin-wallpapers, deepin-desktop-schemas, libstartup_notification, deepin-wallpapers, deepin-desktop-schemas,
deepin }: deepin, wrapGAppsHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
libtool libtool
glib.dev glib.dev
gnome3.gnome-common gnome3.gnome-common
wrapGAppsHook
]; ];
buildInputs = [ buildInputs = [

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, qttools, qtx11extras, { stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qttools, qtx11extras,
dtkcore, dtkwidget, ffmpeg, ffmpegthumbnailer, mpv, pulseaudio, dtkcore, dtkwidget, ffmpeg, ffmpegthumbnailer, mpv, pulseaudio,
libdvdnav, libdvdread, xorg, deepin }: libdvdnav, libdvdread, xorg, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-movie-reborn"; pname = "deepin-movie-reborn";
version = "3.2.24"; version = "3.2.24";

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, xdg_utils, qttools, qtx11extras, { stdenv, mkDerivation, fetchFromGitHub, fetchpatch, cmake, pkgconfig, xdg_utils, qttools, qtx11extras,
dtkcore, dtkwidget, dtkwm, deepin-turbo, deepin-shortcut-viewer, dtkcore, dtkwidget, dtkwm, deepin-turbo, deepin-shortcut-viewer,
deepin }: deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-screenshot"; pname = "deepin-screenshot";
version = "4.2.1"; version = "4.2.1";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, dtkcore, dtkwidget, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, dtkcore, dtkwidget,
qt5integration, deepin }: qt5integration, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-shortcut-viewer"; pname = "deepin-shortcut-viewer";
version = "1.3.5"; version = "1.3.5";

View File

@ -2,7 +2,7 @@
gettext, at-spi2-core, dbus, epoxy, expect, gtk3, json-glib, gettext, at-spi2-core, dbus, epoxy, expect, gtk3, json-glib,
libXdmcp, libgee, libpthreadstubs, librsvg, libsecret, libtasn1, libXdmcp, libgee, libpthreadstubs, librsvg, libsecret, libtasn1,
libxcb, libxkbcommon, p11-kit, pcre, vte, wnck, libselinux, libxcb, libxkbcommon, p11-kit, pcre, vte, wnck, libselinux,
libsepol, utillinux, deepin-menu, deepin-shortcut-viewer, deepin }: libsepol, utillinux, deepin-menu, deepin-shortcut-viewer, deepin, wrapGAppsHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
gettext gettext
libselinux libsepol utillinux # required by gio libselinux libsepol utillinux # required by gio
deepin.setupHook deepin.setupHook
wrapGAppsHook
]; ];
buildInputs = [ buildInputs = [

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, qtbase, deepin }: { stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qtbase, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "deepin-turbo"; pname = "deepin-turbo";
version = "0.0.3"; version = "0.0.3";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages, deepin }: { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, gsettings-qt, pythonPackages, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dtkcore"; pname = "dtkcore";
version = "2.0.14"; version = "2.0.14";

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qttools, qtmultimedia, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qttools, qtmultimedia,
qtsvg, qtx11extras, librsvg, libstartup_notification, gsettings-qt, qtsvg, qtx11extras, librsvg, libstartup_notification, gsettings-qt,
dde-qt-dbus-factory, dtkcore, deepin }: dde-qt-dbus-factory, dtkcore, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dtkwidget"; pname = "dtkwidget";
version = "2.0.14"; version = "2.0.14";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qtx11extras, dtkcore, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qtx11extras, dtkcore,
deepin }: deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "dtkwm"; pname = "dtkwm";
version = "2.0.11"; version = "2.0.11";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, qtbase, qttools, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, qtbase, qttools,
qtwebchannel, qtx11extras, qtwebchannel, qtx11extras,
gnome2, nss, nspr, alsaLib, atk, cairo, cups, dbus, gnome2, nss, nspr, alsaLib, atk, cairo, cups, dbus,
expat, fontconfig, gdk_pixbuf, glib, gtk2, expat, fontconfig, gdk_pixbuf, glib, gtk2,
@ -38,7 +38,7 @@ let
libPath = stdenv.lib.makeLibraryPath rpahtLibraries; libPath = stdenv.lib.makeLibraryPath rpahtLibraries;
in in
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "qcef"; pname = "qcef";
version = "1.1.6"; version = "1.1.6";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, qtx11extras, libSM, { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, qtx11extras, libSM,
mtdev, cairo, deepin }: mtdev, cairo, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "qt5dxcb-plugin"; pname = "qt5dxcb-plugin";
version = "1.2.2"; version = "1.2.2";

View File

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, pkgconfig, qmake, mtdev , { stdenv, mkDerivation, fetchFromGitHub, pkgconfig, qmake, mtdev,
lxqt, qtx11extras, qtmultimedia, qtsvg , lxqt, qtx11extras, qtmultimedia, qtsvg,
qt5dxcb-plugin, qtstyleplugins, dtkcore, dtkwidget, deepin }: qt5dxcb-plugin, qtstyleplugins, dtkcore, dtkwidget, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "qt5integration"; pname = "qt5integration";
version = "0.3.12"; version = "0.3.12";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, qmake, qtbase, deepin }: { stdenv, mkDerivation, fetchFromGitHub, qmake, qtbase, deepin }:
stdenv.mkDerivation rec { mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "udisks2-qt5"; pname = "udisks2-qt5";
version = "0.0.1"; version = "0.0.1";