about summary refs log tree commit diff
path: root/pkgs/desktops/deepin/dde-kwin
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-10-22 17:36:39 -0400
committerworldofpeace <worldofpeace@protonmail.ch>2019-10-22 17:36:39 -0400
commit11a0602b3d95d9ed8a88a095867d43f4cca1f101 (patch)
tree429b1967bbe29029b58ee292a300c016f2bcf5ae /pkgs/desktops/deepin/dde-kwin
parent69e90bd1a7c2bd65307b1db2192c621cbc0734be (diff)
downloadnixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar.gz
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar.bz2
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar.lz
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar.xz
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.tar.zst
nixlib-11a0602b3d95d9ed8a88a095867d43f4cca1f101.zip
fixup! deepin.dde-kwin: init at 5.0.0
Diffstat (limited to 'pkgs/desktops/deepin/dde-kwin')
-rw-r--r--pkgs/desktops/deepin/dde-kwin/0001-dde-kwin.pc-make-paths-relative.patch56
-rw-r--r--pkgs/desktops/deepin/dde-kwin/default.nix24
-rw-r--r--pkgs/desktops/deepin/dde-kwin/fix-paths.patch (renamed from pkgs/desktops/deepin/dde-kwin/plugin-paths.patch)0
3 files changed, 76 insertions, 4 deletions
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 <worldofpeace@protonmail.ch>
+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
index 1bf576e5c1a5..1bf576e5c1a5 100644
--- a/pkgs/desktops/deepin/dde-kwin/plugin-paths.patch
+++ b/pkgs/desktops/deepin/dde-kwin/fix-paths.patch