Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cfaa8b865215
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 03ad61c987e9
Choose a head ref
  • 6 commits
  • 8 files changed
  • 1 contributor

Commits on Oct 22, 2019

  1. deepin.deepin-wm: remove

    Upstream has deprecated this package. And it's currently broken.
    worldofpeace committed Oct 22, 2019
    Copy the full SHA
    05ebf34 View commit details
  2. deepin.deepin-metacity: remove

    Also obsolete.
    worldofpeace committed Oct 22, 2019
    Copy the full SHA
    a18702f View commit details
  3. deepin.deepin-mutter: remove

    Also obsolete.
    worldofpeace committed Oct 22, 2019
    Copy the full SHA
    d797361 View commit details
  4. Copy the full SHA
    69e90bd View commit details
  5. Copy the full SHA
    11a0602 View commit details

Commits on Oct 29, 2019

  1. Merge pull request #71614 from worldofpeace/deepin-kwin

    deepin.dde-kwin: init at 5.0.0
    worldofpeace authored Oct 29, 2019
    Copy the full SHA
    03ad61c View commit details
Original file line number Diff line number Diff line change
@@ -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

140 changes: 140 additions & 0 deletions pkgs/desktops/deepin/dde-kwin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{ 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
];

# 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 = [
"-DKWIN_VERSION=${(builtins.parseDrvName kwin.name).version}"
];

patches = [
./0001-dde-kwin.pc-make-paths-relative.patch
./fix-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
# TODO: 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
# Correct qt plugin installation path to be within dde-kwin prefix.
substituteInPlace CMakeLists.txt \
--subst-var-by plugin_path "$out/$qtPluginPrefix"
'';

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 configuration for Deepin Desktop Environment";
homepage = "https://github.com/linuxdeepin/dde-kwin";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo worldofpeace ];
};
}
16 changes: 16 additions & 0 deletions pkgs/desktops/deepin/dde-kwin/fix-paths.patch
Original file line number Diff line number Diff line change
@@ -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
65 changes: 0 additions & 65 deletions pkgs/desktops/deepin/deepin-metacity/default.nix

This file was deleted.

41 changes: 0 additions & 41 deletions pkgs/desktops/deepin/deepin-mutter/deepin-mutter.plugins-dir.patch

This file was deleted.

79 changes: 0 additions & 79 deletions pkgs/desktops/deepin/deepin-mutter/default.nix

This file was deleted.

75 changes: 0 additions & 75 deletions pkgs/desktops/deepin/deepin-wm/default.nix

This file was deleted.

6 changes: 1 addition & 5 deletions pkgs/desktops/deepin/default.nix
Original file line number Diff line number Diff line change
@@ -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 { };
@@ -27,9 +28,7 @@ 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 { };
deepin-shortcut-viewer = callPackage ./deepin-shortcut-viewer { };
deepin-sound-theme = callPackage ./deepin-sound-theme { };
@@ -38,9 +37,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 { };