From 05ebf348bcbf728a5a30b402180a058fa82e41f0 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 21 Oct 2019 20:30:42 -0400 Subject: [PATCH 1/5] deepin.deepin-wm: remove Upstream has deprecated this package. And it's currently broken. --- pkgs/desktops/deepin/deepin-wm/default.nix | 75 ---------------------- pkgs/desktops/deepin/default.nix | 3 - 2 files changed, 78 deletions(-) delete mode 100644 pkgs/desktops/deepin/deepin-wm/default.nix diff --git a/pkgs/desktops/deepin/deepin-wm/default.nix b/pkgs/desktops/deepin/deepin-wm/default.nix deleted file mode 100644 index 13b115e7042f..000000000000 --- a/pkgs/desktops/deepin/deepin-wm/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, vala, gnome3, - dbus, bamf, clutter-gtk, pantheon, libgee, libcanberra-gtk3, - libwnck3, deepin-menu, deepin-mutter, deepin-wallpapers, - deepin-desktop-schemas, wrapGAppsHook, deepin }: - -stdenv.mkDerivation rec { - pname = "deepin-wm"; - version = "1.9.38"; - - src = fetchFromGitHub { - owner = "linuxdeepin"; - repo = pname; - rev = version; - sha256 = "1qhdnv4x78f0gkr94q0j8x029fk9ji4m9jdipgrdm83pnahib80g"; - }; - - nativeBuildInputs = [ - pkgconfig - intltool - libtool - vala - gnome3.gnome-common - wrapGAppsHook - deepin.setupHook - ]; - - buildInputs = [ - bamf - clutter-gtk - dbus - deepin-desktop-schemas - deepin-menu - deepin-mutter - deepin-wallpapers - gnome3.gnome-desktop - libcanberra-gtk3 - libgee - libwnck3 - pantheon.granite - ]; - - postPatch = '' - searchHardCodedPaths # debugging - - # fix background path - fixPath ${deepin-wallpapers} /usr/share/backgrounds src/Background/BackgroundSource.vala - sed -i 's|default_background.jpg|deepin/desktop.jpg|' src/Background/BackgroundSource.vala - - # fix executable paths in desktop files - sed -i -e "s,Exec=dbus-send,Exec=${dbus}/bin/dbus-send," data/gala-multitaskingview.desktop.in - sed -i -e "s,Exec=deepin-wm,Exec=$out/bin/deepin-wm," data/gala.desktop - ''; - - NIX_CFLAGS_COMPILE = "-DWNCK_I_KNOW_THIS_IS_UNSTABLE"; - - preConfigure = '' - NOCONFIGURE=1 ./autogen.sh - ''; - - postFixup = '' - searchHardCodedPaths $out # debugging - ''; - - enableParallelBuilding = true; - - passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; }; - - meta = with stdenv.lib; { - description = "Deepin Window Manager"; - homepage = https://github.com/linuxdeepin/deepin-wm; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ romildo ]; - }; -} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 61db4ca05713..85db81aedabe 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -38,9 +38,6 @@ let }; deepin-turbo = callPackage ./deepin-turbo { }; deepin-wallpapers = callPackage ./deepin-wallpapers { }; - deepin-wm = callPackage ./deepin-wm { - vala = pkgs.vala_0_40; - }; dpa-ext-gnomekeyring = callPackage ./dpa-ext-gnomekeyring { }; dtkcore = callPackage ./dtkcore { }; dtkwidget = callPackage ./dtkwidget { }; From a18702f37f40d7a5326ec44ba1e2f0ab26a451d9 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 21 Oct 2019 20:34:24 -0400 Subject: [PATCH 2/5] deepin.deepin-metacity: remove Also obsolete. --- .../deepin/deepin-metacity/default.nix | 65 ------------------- pkgs/desktops/deepin/default.nix | 1 - 2 files changed, 66 deletions(-) delete mode 100644 pkgs/desktops/deepin/deepin-metacity/default.nix diff --git a/pkgs/desktops/deepin/deepin-metacity/default.nix b/pkgs/desktops/deepin/deepin-metacity/default.nix deleted file mode 100644 index 18f542233019..000000000000 --- a/pkgs/desktops/deepin/deepin-metacity/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, glib, - gtk3, libgtop, bamf, json-glib, libcanberra-gtk3, libxkbcommon, - libstartup_notification, deepin-wallpapers, deepin-desktop-schemas, - deepin, wrapGAppsHook }: - -stdenv.mkDerivation rec { - pname = "deepin-metacity"; - version = "3.22.24"; - - src = fetchFromGitHub { - owner = "linuxdeepin"; - repo = pname; - rev = version; - sha256 = "1im0wz1zlxiag4kpp5d4hv0aa0ybr4bizarr3903hrqv0lp46hyx"; - }; - - nativeBuildInputs = [ - pkgconfig - intltool - libtool - glib.dev - gnome3.gnome-common - wrapGAppsHook - ]; - - buildInputs = [ - gnome3.dconf - gtk3 - libgtop - gnome3.zenity - bamf - json-glib - libcanberra-gtk3 - libstartup_notification - libxkbcommon - deepin-wallpapers - deepin-desktop-schemas - ]; - - postPatch = '' - sed -i src/ui/deepin-background-cache.c \ - -e 's;/usr/share/backgrounds/default_background.jpg;${deepin-wallpapers}/share/backgrounds/deepin/desktop.jpg;' - ''; - - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - - configureFlags = [ "--disable-themes-documentation" ]; - - preConfigure = '' - HOME=$TMP - NOCONFIGURE=1 ./autogen.sh - ''; - - enableParallelBuilding = true; - - passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; }; - - meta = with stdenv.lib; { - description = "2D window manager for Deepin"; - homepage = https://github.com/linuxdeepin/deepin-metacity; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ romildo ]; - }; -} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 85db81aedabe..24dc7212948b 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -27,7 +27,6 @@ let deepin-icon-theme = callPackage ./deepin-icon-theme { }; deepin-image-viewer = callPackage ./deepin-image-viewer { }; deepin-menu = callPackage ./deepin-menu { }; - deepin-metacity = callPackage ./deepin-metacity { }; deepin-movie-reborn = callPackage ./deepin-movie-reborn { }; deepin-mutter = callPackage ./deepin-mutter { }; deepin-screenshot = callPackage ./deepin-screenshot { }; From d797361cc70e3a31b5190cea3b744a245052902d Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 21 Oct 2019 20:34:58 -0400 Subject: [PATCH 3/5] deepin.deepin-mutter: remove Also obsolete. --- .../deepin-mutter.plugins-dir.patch | 41 ---------- .../desktops/deepin/deepin-mutter/default.nix | 79 ------------------- pkgs/desktops/deepin/default.nix | 1 - 3 files changed, 121 deletions(-) delete mode 100644 pkgs/desktops/deepin/deepin-mutter/deepin-mutter.plugins-dir.patch delete mode 100644 pkgs/desktops/deepin/deepin-mutter/default.nix diff --git a/pkgs/desktops/deepin/deepin-mutter/deepin-mutter.plugins-dir.patch b/pkgs/desktops/deepin/deepin-mutter/deepin-mutter.plugins-dir.patch deleted file mode 100644 index 4a57b501e01e..000000000000 --- a/pkgs/desktops/deepin/deepin-mutter/deepin-mutter.plugins-dir.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8eeb4febcae517080d6638f8953e02335df79f01 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= -Date: Sat, 20 Apr 2019 00:28:47 -0300 -Subject: [PATCH] Get plugins dir from environment variable - ---- - src/compositor/meta-plugin-manager.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c -index ac5716db..d000100b 100644 ---- a/src/compositor/meta-plugin-manager.c -+++ b/src/compositor/meta-plugin-manager.c -@@ -56,14 +56,22 @@ meta_plugin_manager_set_plugin_type (GType gtype) - void - meta_plugin_manager_load (const gchar *plugin_name) - { -- const gchar *dpath = MUTTER_PLUGIN_DIR "/"; -+ const gchar *env_var; -+ const gchar *dpath; - gchar *path; - MetaModule *module; - -+ env_var = g_getenv ("DEEPIN_MUTTER_PLUGINS_DIR"); -+ g_debug ("$DEEPIN_MUTTER_PLUGINS_DIR: %s\n", env_var); -+ -+ dpath = env_var == NULL || strlen (env_var) == 0 ? MUTTER_PLUGIN_DIR : env_var; -+ g_debug ("dpath: %s\n", dpath); -+ - if (g_path_is_absolute (plugin_name)) - path = g_strdup (plugin_name); - else -- path = g_strconcat (dpath, plugin_name, ".so", NULL); -+ path = g_strconcat (dpath, "/", plugin_name, ".so", NULL); -+ g_debug ("path: %s\n", path); - - module = g_object_new (META_TYPE_MODULE, "path", path, NULL); - if (!module || !g_type_module_use (G_TYPE_MODULE (module))) --- -2.21.0 - diff --git a/pkgs/desktops/deepin/deepin-mutter/default.nix b/pkgs/desktops/deepin/deepin-mutter/default.nix deleted file mode 100644 index 9f2e8068d555..000000000000 --- a/pkgs/desktops/deepin/deepin-mutter/default.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, gtk3, - xorg, libcanberra-gtk3, upower, xkeyboard_config, libxkbcommon, - libstartup_notification, libinput, libgudev, cogl, clutter, systemd, - gsettings-desktop-schemas, deepin-desktop-schemas, wrapGAppsHook, - deepin }: - -stdenv.mkDerivation rec { - pname = "deepin-mutter"; - version = "3.20.38"; - - src = fetchFromGitHub { - owner = "linuxdeepin"; - repo = pname; - rev = version; - sha256 = "1aq7606sgn2c6n8wfgxdryw3lprc4va0zjc0r65798w5656fdi31"; - }; - - nativeBuildInputs = [ - pkgconfig - intltool - libtool - gnome3.gnome-common - wrapGAppsHook - deepin.setupHook - ]; - - buildInputs = [ - clutter - cogl - deepin-desktop-schemas - gnome3.gnome-desktop - gnome3.zenity - gsettings-desktop-schemas - gtk3 - libcanberra-gtk3 - libgudev - libinput - libstartup_notification - libxkbcommon - systemd - upower - xkeyboard_config - xorg.libxkbfile - ]; - - patches = [ - ./deepin-mutter.plugins-dir.patch - ]; - - postPatch = '' - searchHardCodedPaths # debugging - sed -i -e "s,Exec=deepin-mutter,Exec=$out/bin/deepin-mutter," data/mutter.desktop.in - ''; - - configureFlags = [ - "--enable-native-backend" - "--enable-compile-warnings=minimum" - ]; - - preConfigure = '' - NOCONFIGURE=1 ./autogen.sh - ''; - - postFixup = '' - searchHardCodedPaths $out # debugging - ''; - - enableParallelBuilding = true; - - passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; }; - - meta = with stdenv.lib; { - description = "Base window manager for deepin, fork of gnome mutter"; - homepage = https://github.com/linuxdeepin/deepin-mutter; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ romildo ]; - }; -} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 24dc7212948b..cec6abca40b6 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -28,7 +28,6 @@ let deepin-image-viewer = callPackage ./deepin-image-viewer { }; deepin-menu = callPackage ./deepin-menu { }; deepin-movie-reborn = callPackage ./deepin-movie-reborn { }; - deepin-mutter = callPackage ./deepin-mutter { }; deepin-screenshot = callPackage ./deepin-screenshot { }; deepin-shortcut-viewer = callPackage ./deepin-shortcut-viewer { }; deepin-sound-theme = callPackage ./deepin-sound-theme { }; From 69e90bd1a7c2bd65307b1db2192c621cbc0734be Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 21 Oct 2019 22:19:43 -0400 Subject: [PATCH 4/5] deepin.dde-kwin: init at 5.0.0 --- pkgs/desktops/deepin/dde-kwin/default.nix | 124 ++++++++++++++++++ .../deepin/dde-kwin/plugin-paths.patch | 16 +++ pkgs/desktops/deepin/default.nix | 1 + 3 files changed, 141 insertions(+) create mode 100644 pkgs/desktops/deepin/dde-kwin/default.nix create mode 100644 pkgs/desktops/deepin/dde-kwin/plugin-paths.patch diff --git a/pkgs/desktops/deepin/dde-kwin/default.nix b/pkgs/desktops/deepin/dde-kwin/default.nix new file mode 100644 index 000000000000..002971ca0770 --- /dev/null +++ b/pkgs/desktops/deepin/dde-kwin/default.nix @@ -0,0 +1,124 @@ +{ stdenv +, mkDerivation +, pkgconfig +, fetchFromGitHub +, deepin +, cmake +, extra-cmake-modules +, qtbase +, libxcb +, kglobalaccel +, kwindowsystem +, kcoreaddons +, kwin +, dtkcore +, gsettings-qt +, fontconfig +, deepin-desktop-schemas +, glib +, libXrender +, mtdev +, qttools +, deepin-gettext-tools +, kwayland +, qtx11extras +, qtquickcontrols2 +, epoxy +, qt5integration +, dde-session-ui +, dbus +, wrapGAppsHook +}: + +mkDerivation rec { + pname = "dde-kwin"; + version = "5.0.0"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "0bvkx9h5ygj46a0j76kfyq3gvk6zn4fx6clhrmcr40hbi2k33cbl"; + }; + + nativeBuildInputs = [ + cmake + deepin-gettext-tools + deepin.setupHook + extra-cmake-modules + pkgconfig + wrapGAppsHook + ]; + + buildInputs = [ + deepin-desktop-schemas + dtkcore + epoxy + fontconfig + glib + gsettings-qt + kcoreaddons + kglobalaccel + kwayland + kwin + kwindowsystem + libXrender + libxcb + mtdev + qtbase + qtquickcontrols2 + qttools + qtx11extras + qt5integration + ]; + + NIX_CFLAGS_COMPILE = "-I${kwayland.dev}/include/KF5"; + + cmakeFlags = [ + "-DKWIN_VERSION=${(builtins.parseDrvName kwin.name).version}" + ]; + + patches = [ + ./plugin-paths.patch + ]; + + postPatch = '' + searchHardCodedPaths + + patchShebangs translate_ts2desktop.sh \ + translate_generation.sh \ + translate_desktop2ts.sh \ + plugins/kwin-xcb/plugin/translate_generation.sh + + fixPath ${deepin-gettext-tools} /usr/bin/deepin-desktop-ts-convert translate_desktop2ts.sh translate_ts2desktop.sh + + fixPath $out /etc/xdg configures/CMakeLists.txt deepin-wm-dbus/deepinwmfaker.cpp + + # Need environmental patch + fixPath /run/current-system/sw /usr/lib plugins/kwin-xcb/plugin/main.cpp + + substituteInPlace configures/kwin-wm-multitaskingview.desktop \ + --replace "dbus-send" "${dbus}/bin/dbus-send" + + fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-warning-dialog deepin-wm-dbus/deepinwmfaker.cpp + + substituteInPlace CMakeLists.txt \ + --subst-var-by plugin_path "$out/$qtPluginPrefix" + ''; + + postFixup = '' + chmod +x $out/bin/kwin_no_scale + ''; + + enableParallelBuilding = true; + + passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; }; + + meta = with stdenv.lib; { + description = "KWin configures on DDE"; + homepage = "https://github.com/linuxdeepin/dde-kwin"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo worldofpeace ]; + }; +} diff --git a/pkgs/desktops/deepin/dde-kwin/plugin-paths.patch b/pkgs/desktops/deepin/dde-kwin/plugin-paths.patch new file mode 100644 index 000000000000..1bf576e5c1a5 --- /dev/null +++ b/pkgs/desktops/deepin/dde-kwin/plugin-paths.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index feef49d..ecb7ed2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,9 +26,9 @@ macro(query_qmake args output) + endif() + endmacro() + +-query_qmake("QT_INSTALL_PLUGINS" QT_INSTALL_PLUGINS) ++set(QT_INSTALL_PLUGINS @plugin_path@) + +-set(PLUGIN_INSTALL_PATH ${QT_INSTALL_PLUGINS}/platforms) ++set(PLUGIN_INSTALL_PATH @plugin_path@/platforms) + # Find includes in corresponding build directories + set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index cec6abca40b6..5d4b6f732448 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -13,6 +13,7 @@ let dde-daemon = callPackage ./dde-daemon { }; dde-dock = callPackage ./dde-dock { }; dde-file-manager = callPackage ./dde-file-manager { }; + dde-kwin = callPackage ./dde-kwin { }; dde-launcher = callPackage ./dde-launcher { }; dde-network-utils = callPackage ./dde-network-utils { }; dde-polkit-agent = callPackage ./dde-polkit-agent { }; From 11a0602b3d95d9ed8a88a095867d43f4cca1f101 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 22 Oct 2019 17:36:39 -0400 Subject: [PATCH 5/5] fixup! deepin.dde-kwin: init at 5.0.0 --- ...0001-dde-kwin.pc-make-paths-relative.patch | 56 +++++++++++++++++++ pkgs/desktops/deepin/dde-kwin/default.nix | 24 ++++++-- .../{plugin-paths.patch => fix-paths.patch} | 0 3 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 pkgs/desktops/deepin/dde-kwin/0001-dde-kwin.pc-make-paths-relative.patch rename pkgs/desktops/deepin/dde-kwin/{plugin-paths.patch => fix-paths.patch} (100%) diff --git a/pkgs/desktops/deepin/dde-kwin/0001-dde-kwin.pc-make-paths-relative.patch b/pkgs/desktops/deepin/dde-kwin/0001-dde-kwin.pc-make-paths-relative.patch new file mode 100644 index 000000000000..707eb2074095 --- /dev/null +++ b/pkgs/desktops/deepin/dde-kwin/0001-dde-kwin.pc-make-paths-relative.patch @@ -0,0 +1,56 @@ +From c4edb65554f90a5abfc2ecbf63587b8c6ef2653d Mon Sep 17 00:00:00 2001 +From: worldofpeace +Date: Tue, 22 Oct 2019 17:20:24 -0400 +Subject: [PATCH] dde-kwin.pc: make paths relative + +Values like libdir should be relative to the literal ${prefix}. +We also use @ONLY so we don't substitute values like ${prefix} +with CMake resulting in an unintentional replacement. +--- + plugins/kwin-xcb/lib/CMakeLists.txt | 2 +- + plugins/kwin-xcb/lib/dde-kwin.pc.in | 18 +++++++++--------- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/plugins/kwin-xcb/lib/CMakeLists.txt b/plugins/kwin-xcb/lib/CMakeLists.txt +index 0189b74..62e5553 100644 +--- a/plugins/kwin-xcb/lib/CMakeLists.txt ++++ b/plugins/kwin-xcb/lib/CMakeLists.txt +@@ -61,7 +61,7 @@ install_files( + kwinutils.h + ) + +-configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc) ++configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) + if (CMAKE_INSTALL_LIBDIR) + install_files("/${CMAKE_INSTALL_LIBDIR}/pkgconfig" FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc) + elseif (CMAKE_LIBRARY_OUTPUT_DIRECTORY) +diff --git a/plugins/kwin-xcb/lib/dde-kwin.pc.in b/plugins/kwin-xcb/lib/dde-kwin.pc.in +index 9b1d813..1179761 100644 +--- a/plugins/kwin-xcb/lib/dde-kwin.pc.in ++++ b/plugins/kwin-xcb/lib/dde-kwin.pc.in +@@ -1,13 +1,13 @@ +-prefix=${CMAKE_INSTALL_PREFIX} +-exec_prefix=${CMAKE_INSTALL_PREFIX} +-libdir=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} +-includedir=${INCLUDE_OUTPUT_PATH} ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=@INCLUDE_OUTPUT_PATH@ + + +-Name: ${PROJECT_NAME} ++Name: @PROJECT_NAME@ + Description: DDE KWin plugin library +-Version: ${PROJECT_VERSION} +-Libs: -l${PROJECT_NAME} +-Libs.private: -L/usr/X11R6/lib64 -lQt5X11Extras -lKF5WindowSystem -lQt5Widgets -lQt5Gui -lKF5ConfigCore -lKF5CoreAddons -lQt5Core -lGL -lpthread +-Cflags: -I${INCLUDE_OUTPUT_PATH} ++Version: @PROJECT_VERSION@ ++Libs: -l$@PROJECT_NAME@ ++Libs.private: -L/usr/X11R6/lib64 -lQt5X11Extras -lKF5WindowSystem -lQt5Widgets -lQt5Gui -lKF5ConfigCore -lKF5CoreAddons -lQt5Core -lGL -lpthread ++Cflags: -I@INCLUDE_OUTPUT_PATH@ + +-- +2.23.0 + diff --git a/pkgs/desktops/deepin/dde-kwin/default.nix b/pkgs/desktops/deepin/dde-kwin/default.nix index 002971ca0770..850186953f63 100644 --- a/pkgs/desktops/deepin/dde-kwin/default.nix +++ b/pkgs/desktops/deepin/dde-kwin/default.nix @@ -72,6 +72,8 @@ mkDerivation rec { qt5integration ]; + # Need to add kwayland around: + # * https://github.com/linuxdeepin/dde-kwin/blob/5226bb984c844129f9fa589da56e77decb7b39a1/plugins/kwineffects/blur/CMakeLists.txt#L14 NIX_CFLAGS_COMPILE = "-I${kwayland.dev}/include/KF5"; cmakeFlags = [ @@ -79,7 +81,8 @@ mkDerivation rec { ]; patches = [ - ./plugin-paths.patch + ./0001-dde-kwin.pc-make-paths-relative.patch + ./fix-paths.patch ]; postPatch = '' @@ -94,7 +97,7 @@ mkDerivation rec { fixPath $out /etc/xdg configures/CMakeLists.txt deepin-wm-dbus/deepinwmfaker.cpp - # Need environmental patch + # TODO: Need environmental patch fixPath /run/current-system/sw /usr/lib plugins/kwin-xcb/plugin/main.cpp substituteInPlace configures/kwin-wm-multitaskingview.desktop \ @@ -102,20 +105,33 @@ mkDerivation rec { fixPath ${dde-session-ui} /usr/lib/deepin-daemon/dde-warning-dialog deepin-wm-dbus/deepinwmfaker.cpp + # Correct qt plugin installation path to be within dde-kwin prefix. substituteInPlace CMakeLists.txt \ --subst-var-by plugin_path "$out/$qtPluginPrefix" ''; - postFixup = '' + postInstall = '' + # Correct invalid path in .pc + substituteInPlace $out/lib/pkgconfig/dde-kwin.pc \ + --replace "-L/usr/X11R6/lib64" "" + chmod +x $out/bin/kwin_no_scale ''; + dontWrapQtApps = true; + + preFixup = '' + gappsWrapperArgs+=( + "''${qtWrapperArgs[@]}" + ) + ''; + enableParallelBuilding = true; passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; }; meta = with stdenv.lib; { - description = "KWin configures on DDE"; + description = "KWin configuration for Deepin Desktop Environment"; homepage = "https://github.com/linuxdeepin/dde-kwin"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/desktops/deepin/dde-kwin/plugin-paths.patch b/pkgs/desktops/deepin/dde-kwin/fix-paths.patch similarity index 100% rename from pkgs/desktops/deepin/dde-kwin/plugin-paths.patch rename to pkgs/desktops/deepin/dde-kwin/fix-paths.patch