about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/deepin/core
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/desktops/deepin/core')
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-app-services/default.nix71
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-appearance/default.nix82
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-appearance/fix-custom-wallpapers-path.diff68
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-application-manager/default.nix64
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-calendar/default.nix70
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-calendar/fix-wrapped-name-not-in-whitelist.diff13
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-clipboard/default.nix58
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-control-center/default.nix97
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-dock/default.nix89
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/default.nix156
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/use_v23_dbus_interface.diff13
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-gsettings-schemas/default.nix52
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-launchpad/default.nix58
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-network-core/default.nix62
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix57
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-session-shell/default.nix111
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-session-ui/default.nix84
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix69
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dde-widgets/default.nix48
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/0001-hardcode-fallback-background.diff15
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/default.nix117
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/deepin-service-manager/default.nix39
-rw-r--r--nixpkgs/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix53
23 files changed, 1546 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-app-services/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-app-services/default.nix
new file mode 100644
index 000000000000..4c27ced09d56
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-app-services/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, cmake
+, wrapQtAppsHook
+, qtbase
+, qttools
+, doxygen
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-app-services";
+  version = "1.0.23";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-INxbRDpG3MqPW6IMTqEagDCGo7vwxkR6D1+lcWdjO3w=";
+  };
+
+  postPatch = ''
+    substituteInPlace dconfig-center/dde-dconfig-daemon/services/org.desktopspec.ConfigManager.service \
+      --replace "/usr/bin/dde-dconfig-daemon" "$out/bin/dde-dconfig-daemon"
+    substituteInPlace dconfig-center/dde-dconfig/main.cpp \
+      --replace "/bin/dde-dconfig-editor" "dde-dconfig-editor"
+    substituteInPlace dconfig-center/CMakeLists.txt \
+      --replace 'add_subdirectory("example")' " " \
+      --replace 'add_subdirectory("tests")'   " "
+
+    substituteInPlace dconfig-center/dde-dconfig-daemon/services/dde-dconfig-daemon.service \
+      --replace "/usr/bin" "$out/bin" \
+      --replace "/usr/share" "/run/current-system/sw/share"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    doxygen
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkwidget
+    qt5integration
+    qt5platform-plugins
+  ];
+
+  cmakeFlags = [
+    "-DDVERSION=${version}"
+    "-DDSG_DATA_DIR=/run/current-system/sw/share/dsg"
+    "-DQCH_INSTALL_DESTINATION=${placeholder "out"}/${qtbase.qtDocPrefix}"
+  ];
+
+  preConfigure = ''
+    # qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
+    # A workaround is to set QT_PLUGIN_PATH explicitly
+    export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
+  '';
+
+  meta = with lib; {
+    description = "Provids dbus service for reading and writing DSG configuration";
+    homepage = "https://github.com/linuxdeepin/dde-app-services";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/default.nix
new file mode 100644
index 000000000000..fef56b3978f7
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/default.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wrapQtAppsHook
+, qtbase
+, dtkgui
+, gsettings-qt
+, gtk3
+, kconfig
+, kwindowsystem
+, kglobalaccel
+, xorg
+, iconv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-appearance";
+  version = "1.1.6";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-7oRbydLXw8yRzi9L1GH/q0cjMY/DLyWbj4RUSyNpVNM=";
+  };
+
+  patches = [
+    ./fix-custom-wallpapers-path.diff
+  ];
+
+  postPatch = ''
+    substituteInPlace src/service/impl/appearancemanager.cpp \
+      src/service/modules/api/compatibleengine.cpp \
+      src/service/modules/subthemes/customtheme.cpp \
+      --replace "/usr/share" "/run/current-system/sw/share"
+
+    for file in $(grep -rl "/usr/bin/dde-appearance"); do
+      substituteInPlace $file --replace "/usr/bin/dde-appearance" "$out/bin/dde-appearance"
+    done
+
+    substituteInPlace src/service/modules/api/themethumb.cpp \
+      --replace "/usr/lib/deepin-api" "/run/current-system/sw/lib/deepin-api"
+
+    substituteInPlace src/service/dbus/deepinwmfaker.cpp \
+      --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+
+    substituteInPlace src/service/modules/api/locale.cpp \
+      --replace "/usr/share/locale/locale.alias" "${iconv}/share/locale/locale.alias"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkgui
+    gsettings-qt
+    gtk3
+    kconfig
+    kwindowsystem
+    kglobalaccel
+    xorg.libXcursor
+    xorg.xcbutilcursor
+  ];
+
+  cmakeFlags = [
+    "-DDSG_DATA_DIR=/run/current-system/sw/share/dsg"
+    "-DSYSTEMD_USER_UNIT_DIR=${placeholder "out"}/lib/systemd/user"
+  ];
+
+  meta = with lib; {
+    description = "A program used to set the theme and appearance of deepin desktop";
+    homepage = "https://github.com/linuxdeepin/dde-appearance";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/fix-custom-wallpapers-path.diff b/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/fix-custom-wallpapers-path.diff
new file mode 100644
index 000000000000..b9ef2aaafc23
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-appearance/fix-custom-wallpapers-path.diff
@@ -0,0 +1,68 @@
+diff --git a/misc/dconfig/org.deepin.dde.appearance.json b/misc/dconfig/org.deepin.dde.appearance.json
+index b612e6e..371f966 100644
+--- a/misc/dconfig/org.deepin.dde.appearance.json
++++ b/misc/dconfig/org.deepin.dde.appearance.json
+@@ -143,7 +143,7 @@
+             "visibility": "private"
+         },
+         "Background_Uris": {
+-            "value": ["file:///usr/share/backgrounds/default_background.jpg"],
++            "value": ["file:///run/current-system/sw/share/backgrounds/default_background.jpg"],
+             "serial": 0,
+             "flags": [],
+             "name": "Background_Uris",
+diff --git a/src/service/dbus/deepinwmfaker.cpp b/src/service/dbus/deepinwmfaker.cpp
+index 5d455fa..40ec608 100644
+--- a/src/service/dbus/deepinwmfaker.cpp
++++ b/src/service/dbus/deepinwmfaker.cpp
+@@ -54,13 +54,13 @@ Q_GLOBAL_STATIC_WITH_ARGS(QGSettings, _gsettings_dde_zone, ("com.deepin.dde.zone
+ 
+ #define KWinDBusCompositorInterface "org.kde.kwin.Compositing"
+ #define KWinDBusCompositorPath "/Compositor"
+-const char defaultFirstBackgroundUri[] = "file:///usr/share/wallpapers/deepin/desktop.jpg";
++const char defaultFirstBackgroundUri[] = "file:///run/current-system/sw/share/wallpapers/deepin/desktop.jpg";
+ const char defaultSecondBackgroundUri[] = "francesco-ungaro-1fzbUyzsHV8-unsplash";
+ 
+ //default cursor size :24
+ #define DEFAULTCURSORSIZE 24
+ 
+-const char fallback_background_name[] = "file:///usr/share/backgrounds/default_background.jpg";
++const char fallback_background_name[] = "file:///run/current-system/sw/share/backgrounds/default_background.jpg";
+ 
+ //using org::kde::KWin;
+ 
+diff --git a/src/service/impl/appearancemanager.cpp b/src/service/impl/appearancemanager.cpp
+index 360ca6f..6db93ab 100644
+--- a/src/service/impl/appearancemanager.cpp
++++ b/src/service/impl/appearancemanager.cpp
+@@ -821,7 +821,7 @@ void AppearanceManager::doUpdateWallpaperURIs()
+     }
+ 
+     // 如果是用户自己设置的桌面壁纸, 需要将主题更新为自定义
+-    if (!monitorWallpaperUris.first().startsWith("/usr/share/wallpapers/deepin")) {
++    if (!monitorWallpaperUris.first().startsWith("/run/current-system/sw/share/wallpapers/deepin")) {
+         updateCustomTheme(TYPEWALLPAPER, monitorWallpaperUris.first());
+     }
+ }
+@@ -1689,7 +1689,7 @@ QString AppearanceManager::getWallpaperUri(const QString &index, const QString &
+             const Background &bg = backgroudlist.at(QRandomGenerator::global()->generate() % backgroudlist.size());
+             wallpaper = bg.getId();
+         } else {
+-            wallpaper = "file:///usr/share/wallpapers/deepin/desktop.jpg";
++            wallpaper = "file:///run/current-system/sw/wallpapers/deepin/desktop.jpg";
+         }
+ 
+         PhaseWallPaper::setWallpaperUri(index, monitorName, wallpaper);
+diff --git a/src/service/modules/background/backgrounds.cpp b/src/service/modules/background/backgrounds.cpp
+index bf739a5..1076d59 100644
+--- a/src/service/modules/background/backgrounds.cpp
++++ b/src/service/modules/background/backgrounds.cpp
+@@ -11,7 +11,7 @@
+ #include <pwd.h>
+ #include <QDBusReply>
+ 
+-QStringList Backgrounds::systemWallpapersDir = { "/usr/share/wallpapers/deepin" };
++QStringList Backgrounds::systemWallpapersDir = { "/run/current-system/sw/wallpapers/deepin" };
+ QStringList Backgrounds::uiSupportedFormats = { "jpeg", "png", "bmp", "tiff", "gif" };
+ 
+ Backgrounds::Backgrounds(QObject *parent)
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-application-manager/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-application-manager/default.nix
new file mode 100644
index 000000000000..0949bc6e4993
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-application-manager/default.nix
@@ -0,0 +1,64 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wrapQtAppsHook
+, qtbase
+, dtkwidget
+, dde-polkit-agent
+, gsettings-qt
+, libcap
+, jemalloc
+, xorg
+, iconv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-application-manager";
+  version = "1.0.19";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-1P265xqlL/wML66nKdfTgkRx6MCpLwrt5rXu+CyeShU=";
+  };
+
+  # remove this patch after next release
+  postPatch = ''
+    substituteInPlace src/modules/mimeapp/mime_app.cpp src/modules/launcher/common.h src/service/main.cpp \
+      misc/dconf/com.deepin.dde.appearance.json \
+      --replace "/usr/share" "/run/current-system/sw/share"
+
+    substituteInPlace src/lib/dlocale.cpp --replace "/usr/share/locale/locale.alias" "${iconv}/share/locale/locale.alias"
+
+    for file in $(grep -rl "/usr/bin"); do
+      substituteInPlace $file --replace "/usr/bin/" "/run/current-system/sw/bin/"
+    done
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    dtkwidget
+    gsettings-qt
+    libcap
+    jemalloc
+    xorg.libXdmcp
+    xorg.libXres
+  ];
+
+  meta = with lib; {
+    description = "Application manager for DDE";
+    homepage = "https://github.com/linuxdeepin/dde-application-manager";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/default.nix
new file mode 100644
index 000000000000..28bedd7187ac
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qttools
+, pkg-config
+, wrapQtAppsHook
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, dde-qt-dbus-factory
+, qtbase
+, qtsvg
+, libical
+, sqlite
+, runtimeShell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-calendar";
+  version = "5.11.0";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-AgomXDydGHzfybE3r4IW94zIWKtwURmLW68MwqjLBWE=";
+  };
+
+  patches = [
+    ./fix-wrapped-name-not-in-whitelist.diff
+  ];
+
+  postPatch = ''
+    for file in $(grep -rl "/bin/bash"); do
+      substituteInPlace $file --replace "/bin/bash" "${runtimeShell}"
+    done
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qt5integration
+    qt5platform-plugins
+    dtkwidget
+    qtbase
+    qtsvg
+    dde-qt-dbus-factory
+    libical
+    sqlite
+  ];
+
+  cmakeFlags = [ "-DVERSION=${version}" ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "Calendar for Deepin Desktop Environment";
+    homepage = "https://github.com/linuxdeepin/dde-calendar";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/fix-wrapped-name-not-in-whitelist.diff b/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/fix-wrapped-name-not-in-whitelist.diff
new file mode 100644
index 000000000000..a139c4690a89
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-calendar/fix-wrapped-name-not-in-whitelist.diff
@@ -0,0 +1,13 @@
+diff --git a/calendar-service/src/dbusservice/dservicebase.cpp b/calendar-service/src/dbusservice/dservicebase.cpp
+index ac182881..93a9c2d8 100644
+--- a/calendar-service/src/dbusservice/dservicebase.cpp
++++ b/calendar-service/src/dbusservice/dservicebase.cpp
+@@ -52,6 +52,8 @@ bool DServiceBase::clientWhite(const int index)
+             return true;
+         }
+     }
++    if (getClientName().contains("dde-calendar"))
++    	return true;
+     return false;
+ #else
+     Q_UNUSED(index)
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-clipboard/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-clipboard/default.nix
new file mode 100644
index 000000000000..78f2fd0da6a2
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-clipboard/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, dtkwidget
+, gio-qt
+, cmake
+, extra-cmake-modules
+, qttools
+, wayland
+, kwayland
+, dwayland
+, pkg-config
+, wrapQtAppsHook
+, glibmm
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-clipboard";
+  version = "6.0.7";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-6CbCor0vgVMsMt8KY2uWrNqOsBEIaz7s2nViiHz+m1g=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    pkg-config
+    qttools
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkwidget
+    gio-qt
+    wayland
+    kwayland
+    dwayland
+    glibmm
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-DSYSTEMD_USER_UNIT_DIR=${placeholder "out"}/lib/systemd/user"
+  ];
+
+  meta = with lib; {
+    description = "DDE optional clipboard manager componment";
+    homepage = "https://github.com/linuxdeepin/dde-clipboard";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-control-center/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-control-center/default.nix
new file mode 100644
index 000000000000..f397e9ca2837
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-control-center/default.nix
@@ -0,0 +1,97 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qttools
+, doxygen
+, wrapQtAppsHook
+, wrapGAppsHook
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, deepin-pw-check
+, qtbase
+, qtx11extras
+, qtmultimedia
+, polkit-qt
+, libxcrypt
+, librsvg
+, runtimeShell
+, dbus
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-control-center";
+  version = "6.0.28";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-kgQ4ySiYtaklOqER56QtKD9lk1CnRSEAU4QPHycl9eI=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/plugin-accounts/operation/accountsworker.cpp \
+      --replace "/bin/bash" "${runtimeShell}"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    doxygen
+    wrapQtAppsHook
+    wrapGAppsHook
+  ];
+  dontWrapGApps = true;
+
+  buildInputs = [
+    dtkwidget
+    qt5platform-plugins
+    deepin-pw-check
+    qtbase
+    qtx11extras
+    qtmultimedia
+    polkit-qt
+    libxcrypt
+    librsvg
+  ];
+
+  cmakeFlags = [
+    "-DCVERSION=${version}"
+    "-DDISABLE_AUTHENTICATION=YES"
+    "-DDISABLE_UPDATE=YES"
+    "-DDISABLE_LANGUAGE=YES"
+    "-DBUILD_DOCS=OFF"
+    "-DMODULE_READ_DIR=/run/current-system/sw/lib/dde-control-center/modules"
+    "-DLOCALSTATE_READ_DIR=/var"
+  ];
+
+  preConfigure = ''
+    # qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
+    # A workaround is to set QT_PLUGIN_PATH explicitly
+    export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
+  '';
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ librsvg ]}"
+  ];
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Control panel of Deepin Desktop Environment";
+    homepage = "https://github.com/linuxdeepin/dde-control-center";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-dock/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-dock/default.nix
new file mode 100644
index 000000000000..5ea7da4ed201
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-dock/default.nix
@@ -0,0 +1,89 @@
+{ stdenv
+, lib
+, fetchpatch
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, qttools
+, pkg-config
+, wrapQtAppsHook
+, wrapGAppsHook
+, qtbase
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, dwayland
+, qtx11extras
+, gsettings-qt
+, libdbusmenu
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-dock";
+  version = "6.0.22";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-fhc2faiPH35ZKw6SCoGTz+6mgxabNpCFQeY2p68Ba5w=";
+  };
+
+  postPatch = ''
+    substituteInPlace plugins/pluginmanager/pluginmanager.cpp frame/controller/quicksettingcontroller.cpp  \
+      --replace "/usr/lib/dde-dock" "/run/current-system/sw/lib/dde-dock"
+
+    substituteInPlace configs/com.deepin.dde.dock.json frame/util/common.h \
+    --replace "/usr" "/run/current-system/sw"
+
+    for file in $(grep -rl "/usr/lib/deepin-daemon"); do
+      substituteInPlace $file --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+    done
+   '';
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    qttools
+    pkg-config
+    wrapQtAppsHook
+    wrapGAppsHook
+  ];
+  dontWrapGApps = true;
+
+  buildInputs = [
+    qtbase
+    dtkwidget
+    qt5platform-plugins
+    dwayland
+    qtx11extras
+    gsettings-qt
+    libdbusmenu
+    xorg.libXcursor
+    xorg.libXtst
+    xorg.libXdmcp
+    xorg.libXres
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  cmakeFlags = [ "-DVERSION=${version}" ];
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  meta = with lib; {
+    description = "Deepin desktop-environment - dock module";
+    homepage = "https://github.com/linuxdeepin/dde-dock";
+    platforms = platforms.linux;
+    license = licenses.lgpl3Plus;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/default.nix
new file mode 100644
index 000000000000..a197980c8d74
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/default.nix
@@ -0,0 +1,156 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, runtimeShell
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, dde-qt-dbus-factory
+, docparser
+, dde-dock
+, cmake
+, qttools
+, qtx11extras
+, qtmultimedia
+, kcodecs
+, pkg-config
+, ffmpegthumbnailer
+, libsecret
+, libmediainfo
+, mediainfo
+, libzen
+, poppler
+, polkit-qt
+, polkit
+, wrapQtAppsHook
+, wrapGAppsHook
+, lucenepp
+, boost
+, taglib
+, cryptsetup
+, glib
+, qtbase
+, util-dfm
+, deepin-pdfium
+, libuuid
+, libselinux
+, glibmm
+, pcre
+, udisks2
+, libisoburn
+, gsettings-qt
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-file-manager";
+  version = "6.0.31";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-mc2HcoLrwMXKU8w34KUEh62ZfEIfbJLVzz4JGnUE5EM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    pkg-config
+    wrapQtAppsHook
+    wrapGAppsHook
+  ];
+  dontWrapGApps = true;
+
+  patches = [
+    ./use_v23_dbus_interface.diff
+
+    (fetchpatch {
+      name = "use-pkgconfig-to-check-mount.patch";
+      url = "https://github.com/linuxdeepin/dde-file-manager/commit/b6c210057d991591df45b80607a614e7a57a9dc0.patch";
+      hash = "sha256-k0ZYlOVN3hHs1qvvRaJ3i6okOhDE+DoUKGs9AhSFBGU=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs .
+
+    substituteInPlace src/plugins/filemanager/dfmplugin-vault/utils/vaultdefine.h \
+      --replace "/usr/bin/deepin-compressor" "deepin-compressor"
+
+    substituteInPlace src/plugins/filemanager/dfmplugin-avfsbrowser/utils/avfsutils.cpp \
+      --replace "/usr/bin/mountavfs" "mountavfs" \
+      --replace "/usr/bin/umountavfs" "umountavfs"
+
+    substituteInPlace src/plugins/common/core/dfmplugin-menu/{extendmenuscene/extendmenu/dcustomactionparser.cpp,oemmenuscene/oemmenu.cpp} \
+      --replace "/usr" "$out"
+
+    substituteInPlace src/tools/upgrade/dialog/processdialog.cpp \
+      --replace "/usr/bin/dde-file-manager" "dde-file-manager" \
+      --replace "/usr/bin/dde-desktop" "dde-desktop"
+
+    substituteInPlace src/dfm-base/file/local/localfilehandler.cpp \
+      --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+
+    substituteInPlace src/plugins/desktop/ddplugin-background/backgroundservice.cpp \
+      src/plugins/desktop/ddplugin-wallpapersetting/wallpapersettings.cpp \
+      --replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds"
+
+    find . -type f -regex ".*\\.\\(service\\|policy\\|desktop\\)" -exec sed -i -e "s|/usr/|$out/|g" {} \;
+  '';
+
+  buildInputs = [
+    dtkwidget
+    qt5platform-plugins
+    deepin-pdfium
+    util-dfm
+    dde-qt-dbus-factory
+    glibmm
+    docparser
+    dde-dock
+    qtx11extras
+    qtmultimedia
+    kcodecs
+    ffmpegthumbnailer
+    libsecret
+    libmediainfo
+    mediainfo
+    poppler
+    polkit-qt
+    polkit
+    lucenepp
+    boost
+    taglib
+    cryptsetup
+    libuuid
+    libselinux
+    pcre
+    udisks2
+    libisoburn
+    gsettings-qt
+  ];
+
+  cmakeFlags = [
+    "-DVERSION=${version}"
+  ];
+
+  enableParallelBuilding = true;
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  meta = with lib; {
+    description = "File manager for deepin desktop environment";
+    homepage = "https://github.com/linuxdeepin/dde-file-manager";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/use_v23_dbus_interface.diff b/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/use_v23_dbus_interface.diff
new file mode 100644
index 000000000000..5a42ecd4a1f5
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-file-manager/use_v23_dbus_interface.diff
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e93d3ad..94e3eca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,7 +30,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ endif()
+ 
+ #Indentify the version
+-if (${DEEPIN_OS_VERSION} MATCHES "23")
++if (TRUE)
+     add_definitions(-DCOMPILE_ON_V23)
+     set(COMPLIE_ON_V23 TRUE)
+     message("COMPILE ON v23")
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-gsettings-schemas/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-gsettings-schemas/default.nix
new file mode 100644
index 000000000000..a609d707a03c
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-gsettings-schemas/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, runCommand
+, glib
+, gtk3
+, dde-dock
+, startdde
+, dde-session-shell
+, dde-file-manager
+, deepin-desktop-schemas
+, deepin-movie-reborn
+, deepin-screen-recorder
+, deepin-system-monitor
+, gsettings-desktop-schemas
+, extraGSettingsOverrides ? ""
+, extraGSettingsOverridePackages ? [ ]
+}:
+
+let
+  gsettingsOverridePackages = [
+    dde-dock
+    startdde
+    dde-session-shell
+    dde-file-manager
+    deepin-desktop-schemas
+    deepin-movie-reborn
+    deepin-screen-recorder
+    deepin-system-monitor
+    gsettings-desktop-schemas # dde-appearance need org.gnome.desktop.background
+  ] ++ extraGSettingsOverridePackages;
+
+in
+with lib;
+
+# TODO: Having https://github.com/NixOS/nixpkgs/issues/54150 would supersede this
+runCommand "nixos-gsettings-desktop-schemas" { preferLocalBuild = true; }
+''
+    data_dir="$out/share/gsettings-schemas/nixos-gsettings-overrides"
+    schema_dir="$data_dir/glib-2.0/schemas"
+
+    mkdir -p $schema_dir
+
+    ${concatMapStringsSep "\n" (pkg: "cp -rf \"${glib.getSchemaPath pkg}\"/*.xml \"$schema_dir\"") gsettingsOverridePackages}
+
+    chmod -R a+w "$data_dir"
+
+    cat - > "$schema_dir/nixos-defaults.gschema.override" <<- EOF
+    ${extraGSettingsOverrides}
+    EOF
+
+    ${glib.dev}/bin/glib-compile-schemas $schema_dir
+  ''
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-launchpad/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-launchpad/default.nix
new file mode 100644
index 000000000000..92311a49352c
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-launchpad/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qttools
+, pkg-config
+, wrapQtAppsHook
+, dtkwidget
+, dtkdeclarative
+, qtbase
+, appstream-qt
+, kitemmodels
+, qt5integration
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-launchpad";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-o9YKmtaqa4ykoR75V2OpXm4GRPWHI6WKbxWAzY1b8I0=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkwidget
+    dtkdeclarative
+    qtbase
+    appstream-qt
+    kitemmodels
+  ];
+
+  cmakeFlags = [
+    "-DSYSTEMD_USER_UNIT_DIR=${placeholder "out"}/lib/systemd/user"
+  ];
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  meta = with lib; {
+    description = "The 'launcher' or 'start menu' component for DDE";
+    homepage = "https://github.com/linuxdeepin/dde-launchpad";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-network-core/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-network-core/default.nix
new file mode 100644
index 000000000000..24d46698765e
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-network-core/default.nix
@@ -0,0 +1,62 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, qttools
+, pkg-config
+, wrapQtAppsHook
+, qtbase
+, qtsvg
+, dtkwidget
+, dde-dock
+, dde-control-center
+, dde-session-shell
+, networkmanager-qt
+, glib
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-network-core";
+  version = "2.0.15";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-AMuWEz3Eyw0tG0srLWpqS7MO7Z4ZzIay4z59cZQZU0o=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    qttools
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtsvg
+    dtkwidget
+    dde-dock
+    dde-control-center
+    dde-session-shell
+    networkmanager-qt
+    glib
+    gtest
+  ];
+
+  cmakeFlags = [
+    "-DVERSION=${version}"
+  ];
+
+  strictDeps = true;
+
+  meta = with lib; {
+    description = "DDE network library framework";
+    homepage = "https://github.com/linuxdeepin/dde-network-core";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix
new file mode 100644
index 000000000000..f3f93be7f30e
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-polkit-agent/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, dde-qt-dbus-factory
+, pkg-config
+, cmake
+, qttools
+, wrapQtAppsHook
+, polkit-qt
+, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-polkit-agent";
+  version = "6.0.5";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-NSMwNL4ttCaqo0h0sF11bOJ20FhOB+SG27K4k8F4O/o=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkwidget
+    qt5platform-plugins
+    dde-qt-dbus-factory
+    polkit-qt
+  ];
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  postFixup = ''
+    wrapQtApp $out/lib/polkit-1-dde/dde-polkit-agent
+  '';
+
+  meta = with lib; {
+    description = "PolicyKit agent for Deepin Desktop Environment";
+    homepage = "https://github.com/linuxdeepin/dde-polkit-agent";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-session-shell/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-session-shell/default.nix
new file mode 100644
index 000000000000..48479c6893ea
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-session-shell/default.nix
@@ -0,0 +1,111 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, linkFarm
+, cmake
+, pkg-config
+, qttools
+, wrapQtAppsHook
+, wrapGAppsHook
+, qtbase
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, deepin-pw-check
+, gsettings-qt
+, lightdm_qt
+, qtx11extras
+, linux-pam
+, xorg
+, gtest
+, xkeyboard_config
+, dbus
+, dde-session-shell
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-session-shell";
+  version = "6.0.10";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-h4X3RZe7+CxVeFmk/7+7K4d/2D1+jhECKQaxl4TsuvM=";
+  };
+
+  postPatch = ''
+    substituteInPlace scripts/lightdm-deepin-greeter files/wayland/lightdm-deepin-greeter-wayland \
+      --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+
+    substituteInPlace src/session-widgets/auth_module.h \
+      --replace "/usr/lib/dde-control-center" "/run/current-system/sw/lib/dde-control-center"
+
+    substituteInPlace src/global_util/modules_loader.cpp \
+      --replace "/usr/lib/dde-session-shell/modules" "/run/current-system/sw/lib/dde-session-shell/modules"
+
+    substituteInPlace src/{session-widgets/{lockcontent.cpp,userinfo.cpp},widgets/fullscreenbackground.cpp} \
+      --replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds"
+
+    substituteInPlace src/global_util/xkbparser.h \
+      --replace "/usr/share/X11/xkb/rules/base.xml" "${xkeyboard_config}/share/X11/xkb/rules/base.xml"
+
+    substituteInPlace files/{org.deepin.dde.ShutdownFront1.service,org.deepin.dde.LockFront1.service} \
+      --replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" \
+      --replace "/usr/share" "$out/share"
+
+    substituteInPlace src/global_util/{public_func.cpp,constants.h} scripts/lightdm-deepin-greeter files/{dde-lock.desktop,lightdm-deepin-greeter.desktop,wayland/lightdm-deepin-greeter-wayland.desktop} \
+      --replace "/usr" "$out"
+
+    patchShebangs files/deepin-greeter
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    wrapQtAppsHook
+    wrapGAppsHook
+  ];
+  dontWrapGApps = true;
+
+  buildInputs = [
+    qtbase
+    dtkwidget
+    qt5platform-plugins
+    deepin-pw-check
+    gsettings-qt
+    lightdm_qt
+    qtx11extras
+    linux-pam
+    xorg.libXcursor
+    xorg.libXtst
+    xorg.libXrandr
+    xorg.libXdmcp
+    gtest
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  passthru.xgreeters = linkFarm "deepin-greeter-xgreeters" [{
+    path = "${dde-session-shell}/share/xgreeters/lightdm-deepin-greeter.desktop";
+    name = "lightdm-deepin-greeter.desktop";
+  }];
+
+  meta = with lib; {
+    description = "Deepin desktop-environment - session-shell module";
+    homepage = "https://github.com/linuxdeepin/dde-session-shell";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-session-ui/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-session-ui/default.nix
new file mode 100644
index 000000000000..a732589d7ea1
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-session-ui/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qttools
+, wrapQtAppsHook
+, qtbase
+, dtkwidget
+, qt5integration
+, qt5platform-plugins
+, dde-dock
+, gsettings-qt
+, qtx11extras
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-session-ui";
+  version = "6.0.10";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-JwktVbwWdfqURhZuEFdB5oaKMsBZu5DekpZ2WGpcL4Q=";
+  };
+
+  postPatch = ''
+    substituteInPlace widgets/fullscreenbackground.cpp \
+      --replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds" \
+      --replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
+
+    substituteInPlace dde-warning-dialog/src/org.deepin.dde.WarningDialog1.service dde-welcome/src/org.deepin.dde.Welcome1.service \
+      --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+
+    substituteInPlace dmemory-warning-dialog/src/org.deepin.dde.MemoryWarningDialog1.service \
+      --replace "/usr" "$out"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    dtkwidget
+    qt5platform-plugins
+    dde-dock
+    gsettings-qt
+    qtx11extras
+    gtest
+  ];
+
+  cmakeFlags = [
+   "-DDISABLE_SYS_UPDATE=ON"
+  ];
+
+  # qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
+  qtWrapperArgs = [
+    "--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
+  ];
+
+  preFixup = ''
+    qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  postFixup = ''
+    for binary in $out/lib/deepin-daemon/*; do
+      wrapProgram $binary "''${qtWrapperArgs[@]}"
+    done
+  '';
+
+  meta = with lib; {
+    description = "Deepin desktop-environment - Session UI module";
+    homepage = "https://github.com/linuxdeepin/dde-session-ui";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix
new file mode 100644
index 000000000000..72ae99f8c843
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix
@@ -0,0 +1,69 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wrapQtAppsHook
+, qtbase
+, dtkcore
+, gsettings-qt
+, libsecret
+, xorg
+, systemd
+, dde-polkit-agent
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-session";
+  version = "1.1.9";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-CyHvvNALXe4fOMjD48By/iaU6/xNUhH9yG19Ob3bHy0=";
+  };
+
+  postPatch = ''
+    # Avoid using absolute path to distinguish applications
+    substituteInPlace src/dde-session/impl/sessionmanager.cpp \
+      --replace 'file.readAll().startsWith("/usr/bin/dde-lock")' 'file.readAll().contains("dde-lock")' \
+
+    substituteInPlace systemd/dde-session-initialized.target.wants/dde-polkit-agent.service \
+      --replace "/usr/lib/polkit-1-dde" "${dde-polkit-agent}/lib/polkit-1-dde"
+
+    for file in $(grep -rl "/usr/lib/deepin-daemon"); do
+      substituteInPlace $file --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
+    done
+
+    for file in $(grep -rl "/usr/bin"); do
+      substituteInPlace $file --replace "/usr/bin/" "/run/current-system/sw/bin/"
+    done
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    dtkcore
+    gsettings-qt
+    libsecret
+    xorg.libXcursor
+    systemd
+  ];
+
+  # FIXME: dde-wayland always exits abnormally
+  passthru.providedSessions = [ "dde-x11" ];
+
+  meta = with lib; {
+    description = "New deepin session based on systemd and existing projects";
+    homepage = "https://github.com/linuxdeepin/dde-session";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-widgets/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-widgets/default.nix
new file mode 100644
index 000000000000..975cb978e7a7
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dde-widgets/default.nix
@@ -0,0 +1,48 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, dde-qt-dbus-factory
+, wrapQtAppsHook
+, qtbase
+, qtx11extras
+, dtkwidget
+, qt5integration
+, gtest
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dde-widgets";
+  version = "6.0.14";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-bmhT7UhMXtC5wlRtwlVnGjoq8rUQcDSk4rGQ0Xrz9ZI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    dde-qt-dbus-factory
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtx11extras
+    dtkwidget
+    qt5integration
+    gtest
+  ];
+
+  meta = with lib; {
+    description = "Desktop widgets service/implementation for DDE";
+    homepage = "https://github.com/linuxdeepin/dde-widgets";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/0001-hardcode-fallback-background.diff b/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/0001-hardcode-fallback-background.diff
new file mode 100644
index 000000000000..872fa26c5e55
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/0001-hardcode-fallback-background.diff
@@ -0,0 +1,15 @@
+diff --git a/src/effects/multitaskview/multitaskview.cpp b/src/effects/multitaskview/multitaskview.cpp
+index 268bc42..d41f7bf 100644
+--- a/src/effects/multitaskview/multitaskview.cpp
++++ b/src/effects/multitaskview/multitaskview.cpp
+@@ -50,8 +50,8 @@
+ #define SCISSOR_HOFFD 400
+ 
+ const char screen_recorder[] = "deepin-screen-recorder deepin-screen-recorder";
+-const char fallback_background_name[] = "file:///usr/share/wallpapers/deepin/desktop.jpg";
+-const char previous_default_background_name[] = "file:///usr/share/backgrounds/default_background.jpg";
++const char fallback_background_name[] = "file:///run/current-system/sw/share/wallpapers/deepin/desktop.jpg";
++const char previous_default_background_name[] = "file:///run/current-system/sw/share/backgrounds/default_background.jpg";
+ const char add_workspace_png[] = ":/effects/multitaskview/buttons/add-light.png";//":/resources/themes/add-light.svg";
+ const char delete_workspace_png[] = ":/effects/multitaskview/buttons/workspace_delete.png";
+ 
diff --git a/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/default.nix b/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/default.nix
new file mode 100644
index 000000000000..03e40357317c
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/deepin-kwin/default.nix
@@ -0,0 +1,117 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wayland
+, dwayland
+, qtbase
+, qttools
+, qtx11extras
+, wrapQtAppsHook
+, extra-cmake-modules
+, gsettings-qt
+, libepoxy
+, kconfig
+, kconfigwidgets
+, kcoreaddons
+, kcrash
+, kdbusaddons
+, kiconthemes
+, kglobalaccel
+, kidletime
+, knotifications
+, kpackage
+, plasma-framework
+, kcmutils
+, knewstuff
+, kdecoration
+, kscreenlocker
+, breeze-qt5
+, libinput
+, mesa
+, lcms2
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "deepin-kwin";
+  version = "5.25.11";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-J92T1hsRmmtkjF9OPsrikRtd7bQSEG88UOYu+BHUSx0=";
+  };
+
+  patches = [
+    ./0001-hardcode-fallback-background.diff
+  ];
+
+  # Avoid using absolute path to distinguish applications
+  postPatch = ''
+    substituteInPlace src/effects/screenshot/screenshotdbusinterface1.cpp \
+      --replace 'file.readAll().startsWith(DEFINE_DDE_DOCK_PATH"dde-dock")' 'file.readAll().contains("dde-dock")'
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    extra-cmake-modules
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qttools
+    qtx11extras
+    wayland
+    dwayland
+    libepoxy
+    gsettings-qt
+
+    kconfig
+    kconfigwidgets
+    kcoreaddons
+    kcrash
+    kdbusaddons
+    kiconthemes
+
+    kglobalaccel
+    kidletime
+    knotifications
+    kpackage
+    plasma-framework
+    kcmutils
+    knewstuff
+    kdecoration
+    kscreenlocker
+
+    breeze-qt5
+    libinput
+    mesa
+    lcms2
+
+    xorg.libxcb
+    xorg.libXdmcp
+    xorg.libXcursor
+    xorg.xcbutilcursor
+    xorg.libXtst
+    xorg.libXScrnSaver
+  ];
+
+  cmakeFlags = [
+    "-DKWIN_BUILD_RUNNERS=OFF"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  meta = with lib; {
+    description = "Fork of kwin, an easy to use, but flexible, composited Window Manager";
+    homepage = "https://github.com/linuxdeepin/deepin-kwin";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/deepin-service-manager/default.nix b/nixpkgs/pkgs/desktops/deepin/core/deepin-service-manager/default.nix
new file mode 100644
index 000000000000..3d657ef33869
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/deepin-service-manager/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "deepin-service-manager";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-gTzyQHFPyn2+A+o+4VYySDBCZftfG2WnTXuqzeF+QhA=";
+  };
+
+  postPatch = ''
+    for file in $(grep -rl "/usr/bin/deepin-service-manager"); do
+      substituteInPlace $file --replace "/usr/bin/deepin-service-manager" "$out/bin/deepin-service-manager"
+    done
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  meta = with lib; {
+    description = "Manage DBus service on Deepin";
+    homepage = "https://github.com/linuxdeepin/deepin-service-manager";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix
new file mode 100644
index 000000000000..febfa41711e0
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/deepin/core/dpa-ext-gnomekeyring/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qttools
+, wrapQtAppsHook
+, dtkwidget
+, dde-polkit-agent
+, qt5integration
+, libsecret
+, libgnome-keyring
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dpa-ext-gnomekeyring";
+  version = "6.0.1";
+
+  src = fetchFromGitHub {
+    owner = "linuxdeepin";
+    repo = pname;
+    rev = version;
+    hash = "sha256-SyoahSdGPkWitDek4RD5M2hTR78GFpuijryteKVAx6k=";
+  };
+
+  postPatch = ''
+    substituteInPlace gnomekeyringextention.cpp \
+      --replace "/usr/share/dpa-ext-gnomekeyring" "$out/share/dpa-ext-gnomekeyring"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    qttools
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    dtkwidget
+    dde-polkit-agent
+    qt5integration
+    libgnome-keyring
+    libsecret
+  ];
+
+  meta = with lib; {
+    description = "GNOME keyring extension for dde-polkit-agent";
+    homepage = "https://github.com/linuxdeepin/dpa-ext-gnomekeyring";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.deepin.members;
+  };
+}