Merge pull request #257400 from wineee/deepin-23

deepin desktop environment: v20 -> v23Beta
This commit is contained in:
Weijia Wang 2023-11-30 02:47:08 +01:00 committed by GitHub
commit babc0d5e96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 1574 additions and 2464 deletions

View File

@ -25,8 +25,17 @@ with lib;
config = mkIf config.services.deepin.app-services.enable {
environment.systemPackages = [ pkgs.deepin.dde-app-services ];
users.groups.dde-dconfig-daemon = { };
users.users.dde-dconfig-daemon = {
description = "Dconfig daemon user";
home = "/var/lib/dde-dconfig-daemon";
createHome = true;
group = "dde-dconfig-daemon";
isSystemUser = true;
};
environment.systemPackages = [ pkgs.deepin.dde-app-services ];
systemd.packages = [ pkgs.deepin.dde-app-services ];
services.dbus.packages = [ pkgs.deepin.dde-app-services ];
environment.pathsToLink = [ "/share/dsg" ];

View File

@ -38,8 +38,8 @@ in
config = mkIf cfg.enable
{
services.xserver.displayManager.sessionPackages = [ pkgs.deepin.startdde ];
services.xserver.displayManager.defaultSession = mkDefault "deepin";
services.xserver.displayManager.sessionPackages = [ pkgs.deepin.dde-session ];
services.xserver.displayManager.defaultSession = mkDefault "dde-x11";
# Update the DBus activation environment after launching the desktop manager.
services.xserver.displayManager.sessionCommands = ''
@ -93,6 +93,9 @@ in
"/lib/dde-file-manager"
"/share/backgrounds"
"/share/wallpapers"
"/share/dde-daemon"
"/share/dsg"
"/share/deepin-themes"
];
environment.etc = {
@ -138,19 +141,25 @@ in
libsForQt5.kde-gtk-config # deepin-api/gtk-thumbnailer need
libsForQt5.kglobalaccel
xsettingsd # lightdm-deepin-greeter
dtkcommon
dtkcore
dtkgui
dtkwidget
dtkdeclarative
qt5platform-plugins
deepin-pw-check
deepin-turbo
dde-account-faces
deepin-icon-theme
deepin-desktop-theme
deepin-sound-theme
deepin-gtk-theme
deepin-wallpapers
startdde
dde-dock
dde-launcher
dde-launchpad
dde-session-ui
dde-session-shell
dde-file-manager
@ -162,8 +171,12 @@ in
dpa-ext-gnomekeyring
deepin-desktop-schemas
deepin-terminal
dde-kwin
deepin-kwin
dde-session
dde-widgets
dde-appearance
dde-application-manager
deepin-service-manager
];
optionalPackages = [
onboard # dde-dock plugin
@ -187,24 +200,33 @@ in
services.dbus.packages = with pkgs.deepin; [
dde-dock
dde-launcher
dde-launchpad
dde-session-ui
dde-session-shell
dde-file-manager
dde-control-center
dde-calendar
dde-clipboard
dde-kwin
deepin-kwin
deepin-pw-check
dde-widgets
dde-session
dde-appearance
dde-application-manager
deepin-service-manager
];
systemd.packages = with pkgs.deepin; [
dde-launcher
dde-launchpad
dde-file-manager
dde-calendar
dde-clipboard
deepin-kwin
dde-appearance
dde-widgets
dde-session
dde-application-manager
deepin-service-manager
];
};
}

View File

@ -36,12 +36,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
with subtest("Check that logging in has given the user ownership of devices"):
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
with subtest("Check if DDE wm chooser actually start"):
machine.wait_until_succeeds("pgrep -f dde-wm-chooser")
machine.wait_for_window("dde-wm-chooser")
machine.execute("pkill dde-wm-chooser")
with subtest("Check if Deepin session components actually start"):
machine.wait_until_succeeds("pgrep -f dde-session-daemon")
machine.wait_for_window("dde-session-daemon")

View File

@ -6,39 +6,29 @@
, qttools
, wrapQtAppsHook
, dtkwidget
, dtkdeclarative
, qt5integration
, qt5platform-plugins
, qtbase
, qtsvg
, udisks2-qt5
, gio-qt
, image-editor
, glibmm
, freeimage
, opencv
, ffmpeg
, ffmpegthumbnailer
}:
stdenv.mkDerivation rec {
pname = "deepin-album";
version = "5.10.9";
version = "6.0.2";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-S/oVRD72dtpnvfGV6YfN5/syrmWA44H/1BbmAe0xjAY=";
hash = "sha256-kRQiH6LvXDpQOgBQiFHM+YQzQFSupOj98aEPbcUumZ8=";
};
# This patch should be removed after upgrading to 6.0.0
postPatch = ''
substituteInPlace libUnionImage/CMakeLists.txt \
--replace "/usr" "$out"
substituteInPlace src/CMakeLists.txt \
--replace "/usr" "$out"
'';
nativeBuildInputs = [
cmake
pkg-config
@ -48,16 +38,14 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
dtkdeclarative
qt5integration
qt5platform-plugins
qtbase
qtsvg
udisks2-qt5
gio-qt
image-editor
glibmm
freeimage
opencv
ffmpeg
ffmpegthumbnailer
];

View File

@ -6,6 +6,8 @@
, qttools
, wrapQtAppsHook
, dtkwidget
, wayland
, dwayland
, qt5integration
, qt5platform-plugins
, image-editor
@ -14,6 +16,7 @@
, ffmpeg
, ffmpegthumbnailer
, libusb1
, libpciaccess
, portaudio
, libv4l
, gst_all_1
@ -22,13 +25,13 @@
stdenv.mkDerivation rec {
pname = "deepin-camera";
version = "6.0.2";
version = "unstable-2023-09-26";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-GQQFwlJNfdsi0GvDRMIorUnlbXrgbYl9H9aBedOm+ZQ=";
rev = "8ad3b6ad2a4f5f0b22a216496a0187a69a1e1bcc";
hash = "sha256-/8ddplHJzeu7lrRzN66KhJGkFou4FcXc+BzYFK5YVeE=";
};
# QLibrary and dlopen work with LD_LIBRARY_PATH
@ -52,6 +55,8 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
wayland
dwayland
qt5integration
qt5platform-plugins
image-editor
@ -60,6 +65,7 @@ stdenv.mkDerivation rec {
ffmpeg
ffmpegthumbnailer
libusb1
libpciaccess
portaudio
libv4l
] ++ (with gst_all_1 ; [

View File

@ -68,6 +68,7 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
broken = true;
};
}

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, dtkwidget
, qt5integration
, qt5platform-plugins
@ -29,6 +30,14 @@ stdenv.mkDerivation rec {
hash = "sha256-oOxto0X/GBAA9q691uwC0PtCdHDTMBqi80ov4xCXPn0=";
};
patches = [
(fetchpatch {
name = "fix-build-failures-for-new-dtkgui.patch";
url = "https://github.com/linuxdeepin/deepin-compressor/commit/0ee07030034b06021e366d8d6109f344d47ea26c.patch";
hash = "sha256-P++SxzZCWoXJnLQhC0H/64/LjW/dqnl3hCGBWHVDn9Q=";
})
];
postPatch = ''
substituteInPlace src/source/common/pluginmanager.cpp \
--replace "/usr/lib/" "$out/lib/"

View File

@ -1,25 +0,0 @@
From c2fa29800c64f5bda04203bb2eb1845b29c1de3c Mon Sep 17 00:00:00 2001
From: rewine <luhongxu@deepin.org>
Date: Fri, 25 Mar 2022 18:20:17 +0800
Subject: [PATCH] fix install path for nix
---
qimage-plugins/libraw/CMakeLists.txt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/qimage-plugins/libraw/CMakeLists.txt b/qimage-plugins/libraw/CMakeLists.txt
index 4bfd85ad..00d11bd3 100644
--- a/qimage-plugins/libraw/CMakeLists.txt
+++ b/qimage-plugins/libraw/CMakeLists.txt
@@ -44,7 +44,6 @@ target_include_directories(xraw PUBLIC ${RAW_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIR
target_link_libraries(${CMD_NAME} Qt5::Core Qt5::Gui raw)
-install(TARGETS ${CMD_NAME} DESTINATION ${Qt5Core_DIR}/../../qt5/plugins/imageformats)
-
+install(TARGETS ${CMD_NAME} DESTINATION qt5/plugins/imageformats)
QT5_USE_MODULES(${PROJECT_NAME} Core Gui)
--
2.35.1

View File

@ -2,52 +2,42 @@
, lib
, fetchFromGitHub
, fetchpatch
, qtbase
, qtsvg
, dtkwidget
, qt5integration
, qt5platform-plugins
, gio-qt
, udisks2-qt5
, image-editor
, cmake
, pkg-config
, qttools
, wrapQtAppsHook
, qt5platform-plugins
, qtbase
, dtkwidget
, dtkdeclarative
, deepin-ocr-plugin-manager
, gio-qt
, udisks2-qt5
, image-editor
, libraw
, libexif
, freeimage
}:
stdenv.mkDerivation rec {
pname = "deepin-image-viewer";
version = "5.9.13";
version = "6.0.2";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-T/hbygnbao5rbw0gHH0ULHOz/2j70ktyzYGWXPDCJoQ=";
hash = "sha256-YT3wK+ELXjgtsXbkiCjQF0zczQi89tF1kyIQtl9/mMA=";
};
patches = [
./0001-fix-install-path-for-nix.patch
(fetchpatch {
name = "chore-use-GNUInstallDirs-in-CmakeLists.patch";
url = "https://github.com/linuxdeepin/deepin-image-viewer/commit/4a046e6207fea306e592fddc33c1285cf719a63d.patch";
sha256 = "sha256-aIgYmq6WDfCE+ZcD0GshxM+QmBWZGjh9MzZcTMrhBJ0=";
})
(fetchpatch {
name = "fix-build-with-libraw-0_21.patch";
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/2ff11979704dd7156a7e7c3bae9b30f08894063d/trunk/libraw-0.21.patch";
sha256 = "sha256-I/w4uiANT8Z8ud/F9WCd3iRHOfplu3fpqnu8ZIs4C+w=";
hash = "sha256-I/w4uiANT8Z8ud/F9WCd3iRHOfplu3fpqnu8ZIs4C+w=";
})
];
postPatch = ''
substituteInPlace src/com.deepin.ImageViewer.service \
--replace "/usr/bin/deepin-image-viewer" "$out/bin/deepin-image-viewer"
'';
nativeBuildInputs = [
cmake
pkg-config
@ -56,16 +46,12 @@ stdenv.mkDerivation rec {
];
buildInputs = [
qtbase
qtsvg
dtkwidget
qt5integration
qt5platform-plugins
gio-qt
udisks2-qt5
image-editor
dtkwidget
dtkdeclarative
deepin-ocr-plugin-manager
libraw
libexif
freeimage
];
strictDeps = true;

View File

@ -2,7 +2,6 @@
, lib
, fetchFromGitHub
, fetchpatch
, runtimeShell
, cmake
, pkg-config
, wrapQtAppsHook
@ -31,45 +30,31 @@
, gst_all_1
, gtest
, libpulseaudio
, runtimeShell
}:
stdenv.mkDerivation rec {
pname = "deepin-movie-reborn";
version = "5.10.28";
version = "6.0.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-aILaiVkApXBKJUxvQ1k7CHzL3IOwshsTTjW5Ak31xEM=";
hash = "sha256-dWN2IVVpwYwzEuLtT3JvhzKiBwaBq4lzmaEhA9S1hjE=";
};
patches = [
(fetchpatch {
name = "feat-rewrite-libPath-to-read-LD_LIBRARY_PATH.patch";
url = "https://github.com/linuxdeepin/deepin-movie-reborn/commit/432bf452ed244c256e99ecaf80bb6a0eef9b4a74.patch";
sha256 = "sha256-5hRQ8D9twBKgouVpIBa1pdAGk0lI/wEdQaHBBHFCZBA";
})
./dont_use_libPath.diff
];
postPatch = ''
# https://github.com/linuxdeepin/deepin-movie-reborn/pull/198
substituteInPlace src/common/diskcheckthread.cpp \
--replace "/usr/include/linux/cdrom.h" "linux/cdrom.h"
substituteInPlace src/widgets/toolbox_proxy.cpp \
--replace "/bin/bash" "${runtimeShell}"
# libdmr always assume that these libraries exist
# otherwise it will lead to coredump
# This affects the preview plugin for dde-file-manager
substituteInPlace src/libdmr/{filefilter.cpp,playlist_model.cpp,gstutils.cpp} \
--replace 'LibraryLoader::libPath("libavcodec.so")' '"${lib.getLib ffmpeg}/lib/libavcodec.so"' \
--replace 'LibraryLoader::libPath("libavformat.so")' '"${lib.getLib ffmpeg}/lib/libavformat.so"' \
--replace 'LibraryLoader::libPath("libavutil.so")' '"${lib.getLib ffmpeg}/lib/libavutil.so"' \
--replace 'LibraryLoader::libPath("libffmpegthumbnailer.so")' '"${lib.getLib ffmpegthumbnailer}/lib/libffmpegthumbnailer.so"' \
--replace 'LibraryLoader::libPath("libgstreamer-1.0.so")' '"${lib.getLib gst_all_1.gstreamer}/lib/libgstreamer-1.0.so"' \
--replace 'LibraryLoader::libPath("libgstpbutils-1.0.so")' '"${lib.getLib gst_all_1.gst-plugins-base}/lib/libgstpbutils-1.0.so"'
# https://github.com/linuxdeepin/deepin-movie-reborn/pull/337
substituteInPlace src/libdmr/playlist_model.cpp \
--replace "DGuiApplicationHelper" "Dtk::Gui::DGuiApplicationHelper"
'';
outputs = [ "out" "dev" ];
@ -90,7 +75,7 @@ stdenv.mkDerivation rec {
qtdbusextended
qtmpris
gsettings-qt
elfutils.dev
elfutils
ffmpeg
ffmpegthumbnailer
xorg.libXtst
@ -101,7 +86,7 @@ stdenv.mkDerivation rec {
libdvdnav
libunwind
libva
zstd.dev
zstd
mpv
gtest
libpulseaudio
@ -110,6 +95,12 @@ stdenv.mkDerivation rec {
gst-plugins-base
]);
propagatedBuildInputs = [
qtmultimedia
qtx11extras
ffmpegthumbnailer
];
env.NIX_CFLAGS_COMPILE = toString [
"-I${gst_all_1.gstreamer.dev}/include/gstreamer-1.0"
"-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0"

View File

@ -0,0 +1,108 @@
diff --git a/src/backends/mpv/mpv_proxy.h b/src/backends/mpv/mpv_proxy.h
index 1256a06..d76d1c0 100644
--- a/src/backends/mpv/mpv_proxy.h
+++ b/src/backends/mpv/mpv_proxy.h
@@ -38,6 +38,7 @@ typedef void (*mpv_terminateDestroy)(mpv_handle *ctx);
static QString libPath(const QString &sLib)
{
+ return sLib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/common/hwdec_probe.cpp b/src/common/hwdec_probe.cpp
index d70ed0c..ac2516d 100644
--- a/src/common/hwdec_probe.cpp
+++ b/src/common/hwdec_probe.cpp
@@ -83,6 +83,7 @@ bool HwdecProbe::isFileCanHwdec(const QUrl& url, QList<QString>& hwList)
static QString libPath(const QString &sLib)
{
+ return sLib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/common/platform/platform_thumbnail_worker.cpp b/src/common/platform/platform_thumbnail_worker.cpp
index 17b2bdd..82db2b9 100644
--- a/src/common/platform/platform_thumbnail_worker.cpp
+++ b/src/common/platform/platform_thumbnail_worker.cpp
@@ -88,6 +88,7 @@ Platform_ThumbnailWorker::Platform_ThumbnailWorker()
QString Platform_ThumbnailWorker::libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString lib_path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(lib_path);
diff --git a/src/common/thumbnail_worker.cpp b/src/common/thumbnail_worker.cpp
index 2ba2888..c34841e 100644
--- a/src/common/thumbnail_worker.cpp
+++ b/src/common/thumbnail_worker.cpp
@@ -88,6 +88,7 @@ ThumbnailWorker::ThumbnailWorker()
QString ThumbnailWorker::libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString lib_path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(lib_path);
diff --git a/src/libdmr/compositing_manager.cpp b/src/libdmr/compositing_manager.cpp
index 9b117fc..28a11ec 100644
--- a/src/libdmr/compositing_manager.cpp
+++ b/src/libdmr/compositing_manager.cpp
@@ -237,6 +237,7 @@ bool CompositingManager::isCanHwdec()
QString CompositingManager::libPath(const QString &sLib)
{
+ return sLib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/libdmr/filefilter.cpp b/src/libdmr/filefilter.cpp
index 6691df0..b620a62 100644
--- a/src/libdmr/filefilter.cpp
+++ b/src/libdmr/filefilter.cpp
@@ -72,6 +72,7 @@ FileFilter::FileFilter()
QString FileFilter::libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/libdmr/playlist_model.cpp b/src/libdmr/playlist_model.cpp
index 18a8095..9ea4abf 100644
--- a/src/libdmr/playlist_model.cpp
+++ b/src/libdmr/playlist_model.cpp
@@ -449,6 +449,7 @@ PlaylistModel::PlaylistModel(PlayerEngine *e)
QString PlaylistModel::libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/widgets/platform/platform_toolbox_proxy.cpp b/src/widgets/platform/platform_toolbox_proxy.cpp
index 570acac..9da0f97 100644
--- a/src/widgets/platform/platform_toolbox_proxy.cpp
+++ b/src/widgets/platform/platform_toolbox_proxy.cpp
@@ -709,6 +709,7 @@ private:
static QString libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/widgets/toolbox_proxy.cpp b/src/widgets/toolbox_proxy.cpp
index 05cbc2c..54731bf 100644
--- a/src/widgets/toolbox_proxy.cpp
+++ b/src/widgets/toolbox_proxy.cpp
@@ -760,6 +760,7 @@ private:
static QString libPath(const QString &strlib)
{
+ return strlib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);

View File

@ -3,46 +3,38 @@
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, wrapQtAppsHook
, dtkwidget
, dtkdeclarative
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, udisks2-qt5
, qtmpris
, qtdbusextended
, qtmultimedia
, qttools
, kcodecs
, ffmpeg
, libvlc
, libpulseaudio
, libcue
, taglib
, gsettings-qt
, SDL2
, gtest
, qtbase
, gst_all_1
}:
stdenv.mkDerivation rec {
pname = "deepin-music";
version = "6.2.31";
version = "7.0.3";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-OXyHB47orv9ix+Jg0b7wciA6DWUsXzFmIg4SM+piO3c=";
hash = "sha256-MLfkSO8ru8MKiwgiQ0mPO3zGlnIeSHPc0Op5jjzJ6PE=";
};
postPatch = ''
substituteInPlace src/music-player/CMakeLists.txt \
--replace "/usr/include/vlc" "${libvlc}/include/vlc"
substituteInPlace src/music-player/data/deepin-music.desktop \
--replace "/usr/bin/deepin-music" "$out/bin/deepin-music"
'';
patches = [
"${src}/patches/fix-library-path.patch"
];
nativeBuildInputs = [
cmake
@ -53,22 +45,17 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
dtkdeclarative
qt5integration
qt5platform-plugins
dde-qt-dbus-factory
udisks2-qt5
qtmpris
qtdbusextended
qtmultimedia
kcodecs
ffmpeg
libvlc
libpulseaudio
libcue
taglib
gsettings-qt
SDL2
gtest
] ++ (with gst_all_1; [
gstreamer
gst-plugins-base
@ -79,6 +66,11 @@ stdenv.mkDerivation rec {
"-DVERSION=${version}"
];
env.NIX_CFLAGS_COMPILE = toString [
"-I${libvlc}/include/vlc/plugins"
"-I${libvlc}/include/vlc"
];
strictDeps = true;
preFixup = ''

View File

@ -6,20 +6,20 @@
, pkg-config
, wrapQtAppsHook
, dtkwidget
, qtbase
, qtsvg
, xorg
, qtbase
}:
stdenv.mkDerivation rec {
pname = "deepin-picker";
version = "5.0.28";
version = "6.0.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-b463PqrCpt/DQqint5Xb0cRT66iHNPavj0lsTMv801k=";
hash = "sha256-DkSgeMALhwGeU5sDHuerpPpiN3/3m19jmwtwOjZvOVo=";
};
nativeBuildInputs = [
@ -30,6 +30,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
qtbase
dtkwidget
qtsvg
xorg.libXtst

View File

@ -22,13 +22,13 @@
stdenv.mkDerivation rec {
pname = "deepin-reader";
version = "6.0.2";
version = "6.0.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-69NCxa20wp/tyyGGH/FbHhZ83LECbJWAzaLRo7iYreA=";
hash = "sha256-G5UZ8lBrUo5G3jMae70p/zi9kOVqHWMNCedOy45L1PA=";
};
# don't use vendored htmltopdf

View File

@ -24,25 +24,26 @@
, udev
, gst_all_1
}:
stdenv.mkDerivation rec {
pname = "deepin-screen-recorder";
version = "5.12.1";
version = "unstable-2023-07-10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-43jqgiBa77UAes0ekMES6IqVOPVXfzfQQjePdxFkNDM=";
rev = "e8ee1e8330e2f3923e22acc952a0bd01bee94ad1";
hash = "sha256-QHV3hSALXI4e31YBDXRSRgT8b/J8gwm024bzlPWu2FA=";
};
patches = [ ./dont_use_libPath.diff ];
postPatch = ''
substituteInPlace screen_shot_recorder.pro deepin-screen-recorder.desktop \
src/{src.pro,pin_screenshots/pin_screenshots.pro} \
src/dde-dock-plugins/{shotstart/shotstart.pro,recordtime/recordtime.pro} \
assets/com.deepin.Screenshot.service \
--replace "/usr" "$out"
(
shopt -s globstar
substituteInPlace **/*.pro **/*.service **/*.desktop \
--replace "/usr/" "$out/"
)
'';
nativeBuildInputs = [
@ -80,7 +81,7 @@ stdenv.mkDerivation rec {
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev gst_all_1.gstreamer libv4l ]}"
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ udev gst_all_1.gstreamer libv4l ffmpeg ffmpegthumbnailer ]}"
];
preFixup = ''

View File

@ -1,8 +1,8 @@
diff --git a/src/gstrecord/gstinterface.cpp b/src/gstrecord/gstinterface.cpp
index b269b01..c075295 100644
index 165a7ce..e1574a5 100644
--- a/src/gstrecord/gstinterface.cpp
+++ b/src/gstrecord/gstinterface.cpp
@@ -48,6 +48,7 @@ gstInterface::gstInterface()
@@ -49,6 +49,7 @@ gstInterface::gstInterface()
}
QString gstInterface::libPath(const QString &sLib)
{
@ -11,10 +11,10 @@ index b269b01..c075295 100644
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
diff --git a/src/main_window.cpp b/src/main_window.cpp
index 7bfc78e..dcbbc2f 100755
index e0f6bc5..757abad 100755
--- a/src/main_window.cpp
+++ b/src/main_window.cpp
@@ -585,6 +585,7 @@ void MainWindow::initDynamicLibPath()
@@ -559,6 +559,7 @@ void MainWindow::initDynamicLibPath()
}
QString MainWindow::libPath(const QString &strlib)
{
@ -23,7 +23,7 @@ index 7bfc78e..dcbbc2f 100755
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);
diff --git a/src/waylandrecord/avlibinterface.cpp b/src/waylandrecord/avlibinterface.cpp
index d7942d6..c5cfdf4 100644
index b4145fa..97a3f5c 100644
--- a/src/waylandrecord/avlibinterface.cpp
+++ b/src/waylandrecord/avlibinterface.cpp
@@ -105,6 +105,7 @@ avlibInterface::avlibInterface()
@ -31,6 +31,6 @@ index d7942d6..c5cfdf4 100644
QString avlibInterface::libPath(const QString &sLib)
{
+ return sLib;
//qDebug() << sLib;
QDir dir;
QString path = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
dir.setPath(path);

View File

@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "deepin-screensaver";
version = "5.0.16";
version = "5.0.18";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-d/BllaXZxRdJe8nH+hhQIEutpBvAWFnBHWbIjznUfQU=";
hash = "sha256-7lyHPE/x7rmwh7FtCPkuA8JgYpy90jRXhUWoaeZpVag=";
};
postPatch = ''
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
qmakeFlags = [
"XSCREENSAVER_DATA_PATH=${xscreensaver}/libexec/xscreensaver"
"COMPILE_ON_V23=false"
"COMPILE_ON_V23=true"
];
meta = with lib; {

View File

@ -21,17 +21,19 @@
, util-linux
, systemd
, polkit
, wayland
, dwayland
}:
stdenv.mkDerivation rec {
pname = "deepin-system-monitor";
version = "5.9.33";
version = "6.0.8";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-X7/YwnJyA/HOLsOGARjsHWgL2qxW1eU1TvoWulvz0j4=";
hash = "sha256-7XvS5HviK9XRsxTGnreYX9IQxxGWk7x7MHtcsHCz1rc=";
};
postPatch = ''
@ -74,11 +76,12 @@ stdenv.mkDerivation rec {
procps
libpcap
libnl
wayland
dwayland
];
cmakeFlags = [
"-DVERSION=${version}"
"-DUSE_DEEPIN_WAYLAND=OFF"
];
strictDeps = true;

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, qttools
@ -16,22 +17,37 @@
, gst_all_1
, gtest
}:
stdenv.mkDerivation rec {
pname = "deepin-voice-note";
version = "5.11.1";
version = "6.0.13";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-JX4OuVu+5/a3IhkfnvaWVDaKl+xg/8qxlvp9hM0nHNU=";
hash = "sha256-yDlWyMGkSToGCN7tuZNR8Mz7MUOZ7355w4H0OzeHBrs=";
};
patches = [
./use_v23_dbus_interface.diff
(fetchpatch {
name = "Adjust-the-audio-port-available-range.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/a876e4c4cf7d77e50071246f9fb6998aa62def77.patch";
hash = "sha256-J/PPdj1Am/v2Sw2Dv2XvZJAy/6Tf7OoTfrbOB9rc5m8=";
})
(fetchpatch {
name = "fix-build-error-with-new-dtk.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/9ce211f603deaff21b881e1c4f43d53e33a85347.patch";
hash = "sha256-oP+AzMniONxjYIFust8fGaD8/UOjKr4yZiRUkdTMd5w=";
})
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr" "$out"
substituteInPlace src/common/audiowatcher.cpp \
--replace "/usr/share" "$out/share"
substituteInPlace assets/deepin-voice-note.desktop \
--replace "/usr/bin" "$out/bin"
'';
nativeBuildInputs = [
@ -61,8 +77,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DVERSION=${version}" ];
env.NIX_CFLAGS_COMPILE = "-I${dde-qt-dbus-factory}/include/libdframeworkdbus-2.0";
preFixup = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7bfb81..f56f11a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,7 +103,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all")
execute_process(COMMAND cat /etc/os-version OUTPUT_VARIABLE OS_INFO_STR)
string(REGEX MATCHALL "MajorVersion=[0-9]+" MAJOR_STR "${OS_INFO_STR}")
string(REGEX MATCH "[0-9]+" MAJOR_VERSION "${MAJOR_STR}")
-if (MAJOR_VERSION MATCHES "23")
+if (TRUE)
message("--------------------- OS_BUILD_V23 on")
add_definitions(-DOS_BUILD_V23)
endif()

View File

@ -5,13 +5,13 @@
stdenvNoCC.mkDerivation rec {
pname = "dde-account-faces";
version = "1.0.12.1";
version = "1.0.15";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-NWjR8qxWi2IrcP0cSF+lLxBJ/GrVpk1BfTjVH0ytinY=";
hash = "sha256-/eTGy+9fcYmGrh09RdCIZ2Cn12gTaGtg4Tluv25n5r0=";
};
makeFlags = [ "PREFIX=${placeholder "out"}/var" ];

View File

@ -0,0 +1,57 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, gtk3
, xcursorgen
, papirus-icon-theme
, breeze-icons
, hicolor-icon-theme
, deepin-icon-theme
}:
stdenv.mkDerivation rec {
pname = "deepin-desktop-theme";
version = "1.0.8";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-Zn4QbVuzySHHizvw78uawbdBNKsvxhNQdq+WlLbabc0=";
};
makeFlags = [ "PREFIX=${placeholder "out"}" ];
nativeBuildInputs = [
cmake
gtk3
xcursorgen
];
propagatedBuildInputs = [
breeze-icons
papirus-icon-theme
hicolor-icon-theme
deepin-icon-theme
];
dontDropIconThemeCache = true;
# flow theme has invalid gtk icon cache
# https://github.com/linuxdeepin/developer-center/issues/4291
postFixup = ''
rm -r $out/share/icons/flow
for theme in $out/share/icons/*; do
gtk-update-icon-cache $theme
done
'';
meta = with lib; {
description = "Provides a variety of well-designed theme resources";
homepage = "https://github.com/linuxdeepin/deepin-desktop-theme";
license = with licenses; [ gpl3Plus cc-by-sa-40 ];
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View File

@ -6,21 +6,19 @@
stdenv.mkDerivation rec {
pname = "deepin-wallpapers";
version = "1.7.10";
version = "1.7.16";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-D7DXyPh74VlYn5vKUzDh/P/xoskxs8N/BEg5ZemXRwk=";
hash = "sha256-o5rg1l8N6Ch+BdBLp+HMbVBBvrTdRtn8NSgH/9AnB2Q=";
};
nativeBuildInputs = [ dde-api ];
postPatch = ''
patchShebangs blur_image.sh
substituteInPlace blur_image.sh \
substituteInPlace Makefile \
--replace /usr/lib/deepin-api/image-blur ${dde-api}/lib/deepin-api/image-blur
'';

View File

@ -7,17 +7,19 @@
, cmake
, wrapQtAppsHook
, qtbase
, qttools
, doxygen
}:
stdenv.mkDerivation rec {
pname = "dde-app-services";
version = "0.0.20";
version = "1.0.23";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-M9XXNV3N4CifOXitT6+UxaGsLoVuoNGqC5SO/mF+bLw=";
hash = "sha256-INxbRDpG3MqPW6IMTqEagDCGo7vwxkR6D1+lcWdjO3w=";
};
postPatch = ''
@ -28,10 +30,16 @@ stdenv.mkDerivation rec {
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
];
@ -44,8 +52,15 @@ stdenv.mkDerivation rec {
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";

View File

@ -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;
};
}

View File

@ -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)

View File

@ -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;
};
}

View File

@ -18,13 +18,13 @@
stdenv.mkDerivation rec {
pname = "dde-calendar";
version = "5.10.1";
version = "5.11.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-oPrtPOCLZof4BysWfsCYeoqbJf30r7LijGEEXZlsAAY=";
hash = "sha256-AgomXDydGHzfybE3r4IW94zIWKtwURmLW68MwqjLBWE=";
};
patches = [

View File

@ -2,13 +2,13 @@
, lib
, fetchFromGitHub
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, gio-qt
, cmake
, extra-cmake-modules
, qttools
, wayland
, kwayland
, dwayland
, pkg-config
, wrapQtAppsHook
, glibmm
@ -17,32 +17,18 @@
stdenv.mkDerivation rec {
pname = "dde-clipboard";
version = "5.4.25";
version = "6.0.7";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-oFATOBXf4NvGxjVMlfxwfQkBffeKut8ao+X6T9twb/I=";
hash = "sha256-6CbCor0vgVMsMt8KY2uWrNqOsBEIaz7s2nViiHz+m1g=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/etc/xdg" "$out/etc/xdg" \
--replace "/lib/systemd/user" "$out/lib/systemd/user" \
--replace "/usr/share" "$out/share"
substituteInPlace misc/com.deepin.dde.Clipboard.service \
--replace "/usr/bin/qdbus" "${lib.getBin qttools}/bin/qdbus"
substituteInPlace misc/{dde-clipboard.desktop,dde-clipboard-daemon.service,com.deepin.dde.Clipboard.service} \
--replace "/usr" "$out"
patchShebangs translate_generation.sh generate_gtest_report.sh
'';
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
qttools
wrapQtAppsHook
@ -50,17 +36,16 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
qt5integration
qt5platform-plugins
dde-qt-dbus-factory
gio-qt
wayland
kwayland
dwayland
glibmm
gtest
];
cmakeFlags = [
"-DUSE_DEEPIN_WAYLAND=OFF"
"-DSYSTEMD_USER_UNIT_DIR=${placeholder "out"}/lib/systemd/user"
];
meta = with lib; {

View File

@ -1,86 +1,47 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, doxygen
, wrapQtAppsHook
, wrapGAppsHook
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, deepin-pw-check
, udisks2-qt5
, cmake
, qttools
, qtbase
, pkg-config
, qtx11extras
, qtmultimedia
, wrapQtAppsHook
, wrapGAppsHook
, gsettings-qt
, wayland
, kwayland
, qtwayland
, polkit-qt
, pcre
, xorg
, libselinux
, libsepol
, libxcrypt
, librsvg
, networkmanager-qt
, glib
, runtimeShell
, tzdata
, dbus
, gtest
}:
stdenv.mkDerivation rec {
pname = "dde-control-center";
version = "5.6.3";
version = "6.0.28";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-/gzS+IbopIDRpufsa9cEfFBOqehPUnF4IozvwW8UEbY=";
hash = "sha256-kgQ4ySiYtaklOqER56QtKD9lk1CnRSEAU4QPHycl9eI=";
};
patches = [
# UserExperienceProgramLicenseAgreement comes from a non-open source component(deepin-deepinid-client)
# If we don't block it, only an empty page will be displayed here
# Remove this patch when dde-control-center is upgraded to 6.0.0
./dont-show-endUserLicenseAgreement-for-deepinos.patch
];
postPatch = ''
substituteInPlace src/frame/window/{mainwindow.cpp,insertplugin.cpp} com.deepin.controlcenter.develop.policy \
--replace "/usr/lib/dde-control-center" "/run/current-system/sw/lib/dde-control-center"
substituteInPlace src/frame/modules/datetime/timezone_dialog/timezone.cpp \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
substituteInPlace src/frame/modules/accounts/accountsworker.cpp \
substituteInPlace src/plugin-accounts/operation/accountsworker.cpp \
--replace "/bin/bash" "${runtimeShell}"
substituteInPlace dde-control-center-autostart.desktop \
--replace "/usr" "$out"
substituteInPlace com.deepin.dde.ControlCenter.service \
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" \
--replace "/usr/share" "$out/share"
substituteInPlace include/widgets/utils.h src/{reboot-reminder-dialog/main.cpp,frame/main.cpp,reset-password-dialog/main.cpp} \
--replace "/usr/share/dde-control-center" "$out/share/dde-control-center"
substituteInPlace dde-control-center-wapper \
--replace "qdbus" "${qttools.bin}/bin/qdbus" \
--replace "/usr/share" "$out/share"
'';
nativeBuildInputs = [
cmake
qttools
pkg-config
qttools
doxygen
wrapQtAppsHook
wrapGAppsHook
];
@ -89,35 +50,31 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
qt5platform-plugins
dde-qt-dbus-factory
deepin-pw-check
qtbase
qtx11extras
qtmultimedia
gsettings-qt
udisks2-qt5
wayland
kwayland
qtwayland
polkit-qt
pcre
xorg.libXdmcp
libselinux
libsepol
libxcrypt
librsvg
networkmanager-qt
gtest
];
cmakeFlags = [
"-DCVERSION=${version}"
"-DDISABLE_AUTHENTICATION=YES"
"-DDISABLE_ACTIVATOR=YES"
"-DDISABLE_SYS_UPDATE=YES"
"-DDISABLE_RECOVERY=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}"
@ -125,10 +82,11 @@ stdenv.mkDerivation rec {
];
preFixup = ''
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
outputs = [ "out" "dev" ];
meta = with lib; {
description = "Control panel of Deepin Desktop Environment";
homepage = "https://github.com/linuxdeepin/dde-control-center";

View File

@ -1,29 +0,0 @@
From adcc5eb58e2dcd06810a40c237bc7984c2c5af4b Mon Sep 17 00:00:00 2001
From: rewine <luhongxu@deepin.org>
Date: Sun, 8 Jan 2023 13:46:17 +0800
Subject: [PATCH] dont show endUserLicenseAgreement for deepinos
---
src/frame/window/modules/systeminfo/systeminfowidget.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/frame/window/modules/systeminfo/systeminfowidget.cpp b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
index 8e62604fb..0f443ee20 100644
--- a/src/frame/window/modules/systeminfo/systeminfowidget.cpp
+++ b/src/frame/window/modules/systeminfo/systeminfowidget.cpp
@@ -78,6 +78,12 @@ void SystemInfoWidget::initData()
m_listView->setRowHidden(i, true);
}
}
+
+ if (IsNotDeepinUos) {
+ if (m.gsettingsName == "endUserLicenseAgreement") {
+ m_listView->setRowHidden(i, true);
+ }
+ }
}
if (InsertPlugin::instance()->updatePluginInfo("systeminfo"))
--
2.38.1

View File

@ -1,49 +1,50 @@
{ stdenv
, lib
, fetchpatch
, fetchFromGitHub
, dtkwidget
, dde-qt-dbus-factory
, qt5integration
, qt5platform-plugins
, dde-control-center
, deepin-desktop-schemas
, cmake
, extra-cmake-modules
, qttools
, qtx11extras
, pkg-config
, wrapQtAppsHook
, wrapGAppsHook
, qtbase
, dtkwidget
, qt5integration
, qt5platform-plugins
, dwayland
, qtx11extras
, gsettings-qt
, libdbusmenu
, xorg
, gtest
, qtbase
}:
stdenv.mkDerivation rec {
pname = "dde-dock";
version = "5.5.81";
version = "6.0.22";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-x8U5QPfIykaQLjwbErZiYbZC+JyPQQ+jd6MBjDQyUjs=";
hash = "sha256-fhc2faiPH35ZKw6SCoGTz+6mgxabNpCFQeY2p68Ba5w=";
};
postPatch = ''
substituteInPlace plugins/tray/system-trays/systemtrayscontroller.cpp frame/controller/dockpluginscontroller.cpp \
--replace "/usr/lib/dde-dock/plugins" "/run/current-system/sw/lib/dde-dock/plugins"
substituteInPlace plugins/pluginmanager/pluginmanager.cpp frame/controller/quicksettingcontroller.cpp \
--replace "/usr/lib/dde-dock" "/run/current-system/sw/lib/dde-dock"
substituteInPlace plugins/show-desktop/showdesktopplugin.cpp frame/window/components/desktop_widget.cpp \
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
substituteInPlace configs/com.deepin.dde.dock.json frame/util/common.h \
--replace "/usr" "/run/current-system/sw"
substituteInPlace plugins/{dcc-dock-plugin/settings_module.cpp,tray/system-trays/systemtrayscontroller.cpp} \
--replace "/usr" "$out"
'';
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
@ -52,18 +53,17 @@ stdenv.mkDerivation rec {
dontWrapGApps = true;
buildInputs = [
qtbase
dtkwidget
qt5platform-plugins
dde-qt-dbus-factory
dde-control-center
deepin-desktop-schemas
dwayland
qtx11extras
gsettings-qt
libdbusmenu
xorg.libXcursor
xorg.libXtst
xorg.libXdmcp
gtest
xorg.libXres
];
outputs = [ "out" "dev" ];

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, runtimeShell
, dtkwidget
, qt5integration
@ -38,17 +39,18 @@
, pcre
, udisks2
, libisoburn
, gsettings-qt
}:
stdenv.mkDerivation rec {
pname = "dde-file-manager";
version = "6.0.23";
version = "6.0.31";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-H+pCWZ1jj5p3gOKXYyLxSmjCMv5/BPIz5A25JGGzrR8=";
hash = "sha256-mc2HcoLrwMXKU8w34KUEh62ZfEIfbJLVzz4JGnUE5EM=";
};
nativeBuildInputs = [
@ -60,6 +62,16 @@ stdenv.mkDerivation rec {
];
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 .
@ -115,11 +127,11 @@ stdenv.mkDerivation rec {
pcre
udisks2
libisoburn
gsettings-qt
];
cmakeFlags = [
"-DVERSION=${version}"
"-DDEEPIN_OS_VERSION=20"
];
enableParallelBuilding = true;

View File

@ -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")

View File

@ -3,53 +3,48 @@
, runCommand
, glib
, gtk3
, dtkcommon
, dde-dock
, startdde
, dde-launcher
, dde-session-shell
, dde-session-ui
, dde-control-center
, dde-file-manager
, deepin-desktop-schemas
, deepin-movie-reborn
, deepin-screen-recorder
, deepin-system-monitor
, gsettings-desktop-schemas
, extraGSettingsOverrides ? ""
, extraGSettingsOverridePackages ? [ ]
}:
let
gsettingsOverridePackages = [
dtkcommon
dde-dock
startdde
dde-launcher
dde-session-shell
dde-session-ui
dde-control-center
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" { }
''
schema_dir=$out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
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
${concatMapStrings (pkg: "cp -rvf ${glib.getSchemaPath pkg}/* $schema_dir\n") gsettingsOverridePackages}
${concatMapStringsSep "\n" (pkg: "cp -rf \"${glib.getSchemaPath pkg}\"/*.xml \"$schema_dir\"") gsettingsOverridePackages}
chmod -R a+w $out/share/gsettings-schemas/nixos-gsettings-overrides
chmod -R a+w "$data_dir"
cat - > $schema_dir/nixos-defaults.gschema.override <<- EOF
cat - > "$schema_dir/nixos-defaults.gschema.override" <<- EOF
${extraGSettingsOverrides}
EOF

View File

@ -1,92 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, extra-cmake-modules
, deepin-gettext-tools
, wrapQtAppsHook
, makeWrapper
, dtkcore
, qtbase
, qtx11extras
, gsettings-qt
, xorg
, libepoxy
, deepin-kwin
, kdecoration
, kconfig
, kwayland
, kwindowsystem
, kglobalaccel
}:
stdenv.mkDerivation rec {
pname = "dde-kwin";
version = "5.6.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = "b5c00527b86f773595c786c8015d60f8be3a681b";
sha256 = "sha256-qXN9AwjLnqO5BpnrX5PaSCKZ6ff874r08ubCMM272tA=";
};
/*
This is the final version of dde-kwin, upstream has been archived.
We should remove this package when deepin-kwin release a new version.
*/
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/usr/include/KWaylandServer" "${kwayland.dev}/include/KWaylandServer"
substituteInPlace deepin-wm-dbus/deepinwmfaker.cpp \
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon" \
--replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds" \
--replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
patchShebangs .
'';
nativeBuildInputs = [
cmake
pkg-config
extra-cmake-modules
deepin-gettext-tools
wrapQtAppsHook
makeWrapper
];
buildInputs = [
dtkcore
qtbase
qtx11extras
gsettings-qt
xorg.libXdmcp
libepoxy
deepin-kwin
kdecoration
kconfig
kwayland
kwindowsystem
kglobalaccel
];
cmakeFlags = [
"-DPROJECT_VERSION=${version}"
"-DQT_INSTALL_PLUGINS=${placeholder "out"}/${qtbase.qtPluginPrefix}"
];
# kwin_no_scale is a shell script
postFixup = ''
wrapProgram $out/bin/kwin_no_scale \
--set QT_QPA_PLATFORM_PLUGIN_PATH "${placeholder "out"}/${qtbase.qtPluginPrefix}"
'';
meta = with lib; {
description = "KWin configuration for Deepin Desktop Environment";
homepage = "https://github.com/linuxdeepin/dde-kwin";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View File

@ -1,76 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, dtkwidget
, dde-qt-dbus-factory
, qt5integration
, qt5platform-plugins
, cmake
, qttools
, qtx11extras
, pkg-config
, wrapQtAppsHook
, wrapGAppsHook
, gsettings-qt
, gtest
, qtbase
}:
stdenv.mkDerivation rec {
pname = "dde-launcher";
version = "5.6.1";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-Td8R91892tgJx7FLV2IZ/aPBzDb+o6EYKpk3D8On7Ag=";
};
postPatch = ''
#fix build with new dtk(https://github.com/linuxdeepin/dde-launcher/pull/369)
substituteInPlace src/windowedframe.h \
--replace "#include <dregionmonitor.h>" " "
substituteInPlace src/boxframe/{backgroundmanager.cpp,boxframe.cpp} \
--replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds"
substituteInPlace dde-launcher.desktop dde-launcher-wapper src/dbusservices/com.deepin.dde.Launcher.service \
--replace "/usr" "$out"
'';
nativeBuildInputs = [
cmake
qttools
pkg-config
wrapQtAppsHook
wrapGAppsHook
];
dontWrapGApps = true;
buildInputs = [
dtkwidget
qt5platform-plugins
dde-qt-dbus-factory
qtx11extras
gsettings-qt
gtest
];
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 - Launcher module";
homepage = "https://github.com/linuxdeepin/dde-launcher";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View File

@ -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;
};
}

View File

@ -5,41 +5,28 @@
, qttools
, pkg-config
, wrapQtAppsHook
, qtbase
, qtsvg
, dtkwidget
, dde-dock
, dde-control-center
, dde-session-shell
, dde-qt-dbus-factory
, gsettings-qt
, gio-qt
, networkmanager-qt
, glib
, pcre
, util-linux
, libselinux
, libsepol
, dbus
, gtest
, qtbase
}:
stdenv.mkDerivation rec {
pname = "dde-network-core";
version = "1.1.8";
version = "2.0.15";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-ysmdB9CT7mhN/0r8CRT4FQsK12HkhjbezGXwWiNScqg=";
hash = "sha256-AMuWEz3Eyw0tG0srLWpqS7MO7Z4ZzIay4z59cZQZU0o=";
};
postPatch = ''
substituteInPlace dock-network-plugin/networkplugin.cpp dcc-network-plugin/dccnetworkmodule.cpp dss-network-plugin/network_module.cpp \
--replace "/usr/share" "$out/share"
substituteInPlace dss-network-plugin/notification/bubbletool.cpp \
--replace "/usr/share" "/run/current-system/sw/share"
'';
nativeBuildInputs = [
cmake
qttools
@ -48,19 +35,14 @@ stdenv.mkDerivation rec {
];
buildInputs = [
qtbase
qtsvg
dtkwidget
dde-dock
dde-control-center
dde-session-shell
dde-qt-dbus-factory
gsettings-qt
gio-qt
networkmanager-qt
glib
pcre
util-linux
libselinux
libsepol
gtest
];
@ -68,6 +50,8 @@ stdenv.mkDerivation rec {
"-DVERSION=${version}"
];
strictDeps = true;
meta = with lib; {
description = "DDE network library framework";
homepage = "https://github.com/linuxdeepin/dde-network-core";

View File

@ -12,22 +12,18 @@
, polkit-qt
, qtbase
}:
stdenv.mkDerivation rec {
pname = "dde-polkit-agent";
version = "5.5.22";
version = "6.0.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-4wAqMymLPxKXbfAx2PtkEGfwenphPxBZn+qCdcyqNc0=";
hash = "sha256-NSMwNL4ttCaqo0h0sF11bOJ20FhOB+SG27K4k8F4O/o=";
};
postPatch = ''
substituteInPlace AuthDialog.cpp \
--replace "/usr/share/dde-session-shell/dde-session-shell.conf" "/etc/dde-session-shell/dde-session-shell.conf"
'';
nativeBuildInputs = [
cmake
pkg-config

View File

@ -2,49 +2,46 @@
, lib
, fetchFromGitHub
, linkFarm
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, cmake
, pkg-config
, qttools
, qtx11extras
, wrapQtAppsHook
, wrapGAppsHook
, qtbase
, dtkwidget
, qt5integration
, qt5platform-plugins
, deepin-pw-check
, gsettings-qt
, lightdm_qt
, qtx11extras
, linux-pam
, xorg
, kwayland
, gtest
, xkeyboard_config
, dbus
, qtbase
, dde-session-shell
}:
stdenv.mkDerivation rec {
pname = "dde-session-shell";
version = "5.6.4";
version = "6.0.10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-mrdGu4t86d3No23IrnjypVLx1jxaySatr0xPMY9l5S4";
hash = "sha256-h4X3RZe7+CxVeFmk/7+7K4d/2D1+jhECKQaxl4TsuvM=";
};
postPatch = ''
substituteInPlace src/lightdm-deepin-greeter/greeterworker.cpp \
--replace "/usr/include/shadow.h" "shadow.h"
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/plugin_manager/modules_loader.cpp \
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} \
@ -53,7 +50,7 @@ stdenv.mkDerivation rec {
substituteInPlace src/global_util/xkbparser.h \
--replace "/usr/share/X11/xkb/rules/base.xml" "${xkeyboard_config}/share/X11/xkb/rules/base.xml"
substituteInPlace files/{com.deepin.dde.shutdownFront.service,com.deepin.dde.lockFront.service} \
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"
@ -73,14 +70,14 @@ stdenv.mkDerivation rec {
dontWrapGApps = true;
buildInputs = [
qtbase
dtkwidget
qt5platform-plugins
dde-qt-dbus-factory
deepin-pw-check
gsettings-qt
lightdm_qt
qtx11extras
linux-pam
kwayland
xorg.libXcursor
xorg.libXtst
xorg.libXrandr
@ -88,6 +85,8 @@ stdenv.mkDerivation rec {
gtest
];
outputs = [ "out" "dev" ];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"

View File

@ -1,39 +1,29 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, wrapQtAppsHook
, qtbase
, dtkwidget
, qt5integration
, qt5platform-plugins
, pkg-config
, cmake
, dde-dock
, dde-qt-dbus-factory
, deepin-gettext-tools
, gsettings-qt
, lightdm_qt
, qttools
, qtx11extras
, util-linux
, xorg
, pcre
, libselinux
, libsepol
, wrapQtAppsHook
, gtest
, xkeyboard_config
, qtbase
, dbus
}:
stdenv.mkDerivation rec {
pname = "dde-session-ui";
version = "5.6.2";
version = "6.0.10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-3lW/M07b6gXzGcvQYB+Ojqdq7TfJBaMIKfmfG7o3wWg=";
hash = "sha256-JwktVbwWdfqURhZuEFdB5oaKMsBZu5DekpZ2WGpcL4Q=";
};
postPatch = ''
@ -41,22 +31,10 @@ stdenv.mkDerivation rec {
--replace "/usr/share/backgrounds" "/run/current-system/sw/share/backgrounds" \
--replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
substituteInPlace global_util/xkbparser.h \
--replace "/usr/share/X11/xkb/rules/base.xml" "${xkeyboard_config}/share/X11/xkb/rules/base.xml"
substituteInPlace dde-warning-dialog/com.deepin.dde.WarningDialog.service dde-osd/files/dde-osd.desktop dde-welcome/com.deepin.dde.welcome.service \
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 dde-osd/notification/bubbletool.cpp \
--replace "/usr/share" "/run/current-system/sw/share"
substituteInPlace dde-osd/files/{com.deepin.dde.Notification.service,com.deepin.dde.freedesktop.Notification.service,com.deepin.dde.osd.service} \
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" \
--replace "/usr/share" "$out/share"
substituteInPlace dde-lowpower/main.cpp dmemory-warning-dialog/main.cpp dde-touchscreen-dialog/main.cpp dnetwork-secret-dialog/main.cpp dde-suspend-dialog/main.cpp \
dde-warning-dialog/main.cpp dde-bluetooth-dialog/main.cpp dde-welcome/main.cpp dde-hints-dialog/main.cpp dde-osd/main.cpp dde-wm-chooser/main.cpp \
dde-license-dialog/{content.cpp,main.cpp} dmemory-warning-dialog/com.deepin.dde.MemoryWarningDialog.service \
substituteInPlace dmemory-warning-dialog/src/org.deepin.dde.MemoryWarningDialog1.service \
--replace "/usr" "$out"
'';
@ -64,25 +42,23 @@ stdenv.mkDerivation rec {
cmake
pkg-config
qttools
deepin-gettext-tools
wrapQtAppsHook
];
buildInputs = [
qtbase
dtkwidget
qt5platform-plugins
dde-dock
dde-qt-dbus-factory
gsettings-qt
qtx11extras
pcre
xorg.libXdmcp
util-linux
libselinux
libsepol
gtest
];
cmakeFlags = [
"-DDISABLE_SYS_UPDATE=ON"
];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"

View File

@ -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;
};
}

View File

@ -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;
};
}

View File

@ -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";

View File

@ -36,23 +36,19 @@
stdenv.mkDerivation rec {
pname = "deepin-kwin";
version = "5.24.3-deepin.1.9";
/*
There are no buildable tag in github:
- 5.15 tag in eagel branch is used for UOS, it's too old to compile.
- 5.25 tag in master branch only work on unreleased deepin v23.
Since deepin-kwin was not maintained on github before, we lost all
tags in master branch, this version is read from debian/changelog
*/
version = "5.25.11";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = "98c9085670938937e2a1ce964f6acddc5c1d6eb5";
sha256 = "sha256-/hgDuaDrpwAQsMIoaS8pGBJwWfJSrq6Yjic3a60ITtM=";
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 \
@ -102,6 +98,7 @@ stdenv.mkDerivation rec {
xorg.libXcursor
xorg.xcbutilcursor
xorg.libXtst
xorg.libXScrnSaver
];
cmakeFlags = [

View File

@ -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;
};
}

View File

@ -7,19 +7,20 @@
, wrapQtAppsHook
, dtkwidget
, dde-polkit-agent
, qt5integration
, libsecret
, libgnome-keyring
}:
stdenv.mkDerivation rec {
pname = "dpa-ext-gnomekeyring";
version = "5.0.11";
version = "6.0.1";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-mXaGwbtEwaqfOT0izK64zX4s3VFmsRpUGOVm6oSEhn8=";
hash = "sha256-SyoahSdGPkWitDek4RD5M2hTR78GFpuijryteKVAx6k=";
};
postPatch = ''
@ -37,6 +38,7 @@ stdenv.mkDerivation rec {
buildInputs = [
dtkwidget
dde-polkit-agent
qt5integration
libgnome-keyring
libsecret
];

View File

@ -1,4 +1,4 @@
{ lib, pkgs, libsForQt5 }:
{ lib, pkgs, config, libsForQt5 }:
let
packages = self:
let
@ -9,10 +9,12 @@ let
dtkcore = callPackage ./library/dtkcore { };
dtkgui = callPackage ./library/dtkgui { };
dtkwidget = callPackage ./library/dtkwidget { };
dtkdeclarative = callPackage ./library/dtkdeclarative { };
deepin-pdfium = callPackage ./library/deepin-pdfium { };
qt5platform-plugins = callPackage ./library/qt5platform-plugins { };
qt5integration = callPackage ./library/qt5integration { };
deepin-wayland-protocols = callPackage ./library/deepin-wayland-protocols { };
deepin-ocr-plugin-manager = callPackage ./library/deepin-ocr-plugin-manager { };
dwayland = callPackage ./library/dwayland { };
dde-qt-dbus-factory = callPackage ./library/dde-qt-dbus-factory { };
disomaster = callPackage ./library/disomaster { };
@ -23,21 +25,25 @@ let
util-dfm = callPackage ./library/util-dfm { };
#### CORE
dde-kwin = callPackage ./core/dde-kwin { };
deepin-kwin = callPackage ./core/deepin-kwin { };
dde-appearance = callPackage ./core/dde-appearance { };
dde-app-services = callPackage ./core/dde-app-services { };
dde-application-manager = callPackage ./core/dde-application-manager { };
dde-control-center = callPackage ./core/dde-control-center { };
dde-calendar = callPackage ./core/dde-calendar { };
dde-clipboard = callPackage ./core/dde-clipboard { };
dde-dock = callPackage ./core/dde-dock { };
dde-file-manager = callPackage ./core/dde-file-manager { };
dde-launcher = callPackage ./core/dde-launcher { };
dde-launchpad = callPackage ./core/dde-launchpad { };
dde-network-core = callPackage ./core/dde-network-core { };
dde-session = callPackage ./core/dde-session { };
dde-session-shell = callPackage ./core/dde-session-shell { };
dde-session-ui = callPackage ./core/dde-session-ui { };
deepin-service-manager = callPackage ./core/deepin-service-manager { };
dde-polkit-agent = callPackage ./core/dde-polkit-agent { };
dpa-ext-gnomekeyring = callPackage ./core/dpa-ext-gnomekeyring { };
dde-gsettings-schemas = callPackage ./core/dde-gsettings-schemas { };
dde-widgets = callPackage ./core/dde-widgets { };
#### Dtk Application
deepin-album = callPackage ./apps/deepin-album { };
@ -79,10 +85,14 @@ let
deepin-wallpapers = callPackage ./artwork/deepin-wallpapers { };
deepin-gtk-theme = callPackage ./artwork/deepin-gtk-theme { };
deepin-sound-theme = callPackage ./artwork/deepin-sound-theme { };
deepin-desktop-theme = callPackage ./artwork/deepin-desktop-theme { };
#### MISC
deepin-desktop-base = callPackage ./misc/deepin-desktop-base { };
deepin-turbo = callPackage ./misc/deepin-turbo { };
} // lib.optionalAttrs config.allowAliases {
dde-kwin = throw "The 'deepin.dde-kwin' package was removed as it is outdated and no longer relevant."; # added 2023-09-27
dde-launcher = throw "The 'deepin.dde-launcher' is no longer maintained. Please use 'deepin.dde-launchpad' instead."; # added 2023-11-23
};
in
lib.makeScope libsForQt5.newScope packages

View File

@ -1,54 +0,0 @@
From 47952eb3dfeea945a070496ef6f77e8446d42f86 Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Tue, 21 Mar 2023 10:36:20 +0800
Subject: [PATCH] chore: dont set PATH env
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Log: dbus 环境缺失环境变量应该由 dbus-update-activation-environment 处理 ,不应该由 dde-api 设置 PATH
---
device/main.go | 2 --
locale-helper/main.go | 2 --
2 files changed, 4 deletions(-)
diff --git a/device/main.go b/device/main.go
index 6c5404c..261f109 100644
--- a/device/main.go
+++ b/device/main.go
@@ -5,7 +5,6 @@
package main
import (
- "os"
"time"
"github.com/linuxdeepin/go-lib/dbusutil"
@@ -15,7 +14,6 @@ import (
var logger = log.NewLogger(dbusServiceName)
func main() {
- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
service, err := dbusutil.NewSystemService()
if err != nil {
logger.Fatal("failed to new system service:", err)
diff --git a/locale-helper/main.go b/locale-helper/main.go
index 92e1ddb..5e3a2ff 100644
--- a/locale-helper/main.go
+++ b/locale-helper/main.go
@@ -5,7 +5,6 @@
package main
import (
- "os"
"os/exec"
"sync"
"time"
@@ -45,7 +44,6 @@ var (
)
func main() {
- os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
logger.BeginTracing()
defer logger.EndTracing()

View File

@ -1,53 +1,53 @@
{ stdenv
, lib
, fetchFromGitHub
, buildGoPackage
, wrapQtAppsHook
, wrapGAppsHook
, gtk3
, fetchpatch
, buildGoModule
, pkg-config
, deepin-gettext-tools
, wrapQtAppsHook
, wrapGAppsHook
, alsa-lib
, go-dbus-factory
, go-gir-generator
, go-lib
, gtk3
, libcanberra
, libgudev
, librsvg
, poppler
, pulseaudio
, gdk-pixbuf-xlib
, dbus
, coreutils
, deepin-desktop-base
, dbus
}:
buildGoPackage rec {
buildGoModule rec {
pname = "dde-api";
version = "5.5.32";
goPackagePath = "github.com/linuxdeepin/dde-api";
version = "6.0.7";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-F+vEOSpysqVtjs8de5mCmeANuCbYUQ860ZHl5rwNYac=";
hash = "sha256-kdf1CoZUyda6bOTW0WJTgaXYhocrjRU9ptj7i+k8aaQ=";
};
patches = [ ./0001-dont-set-PATH.patch ];
patches = [
(fetchpatch {
name = "modify_PKGBUILD_to_support_OBS.patch";
url = "https://github.com/linuxdeepin/dde-api/commit/1399522d032c6c649db79a33348cdb1a233bc23a.patch";
hash = "sha256-kSHnYaOxIvv7lAJnvxpSwyRDPyDxpAq9x+gJcBdU3T8=";
})
];
vendorHash = "sha256-4Yscw3QjWG1rlju6sMRHGn3dSe65b1nx10B3KeyAzBM=";
postPatch = ''
substituteInPlace lang_info/lang_info.go \
--replace "/usr/share/i18n/language_info.json" "${deepin-desktop-base}/share/i18n/language_info.json"
substituteInPlace misc/systemd/system/deepin-shutdown-sound.service \
--replace "/usr/bin/true" "${coreutils}/bin/true"
substituteInPlace sound-theme-player/main.go \
--replace "/usr/sbin/alsactl" "alsactl"
substituteInPlace misc/scripts/deepin-boot-sound.sh \
substituteInPlace misc/{scripts/deepin-boot-sound.sh,systemd/system/deepin-login-sound.service} \
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send"
substituteInPlace lunar-calendar/huangli.go adjust-grub-theme/main.go \
@ -62,8 +62,6 @@ buildGoPackage rec {
done
'';
goDeps = ./deps.nix;
nativeBuildInputs = [
pkg-config
deepin-gettext-tools
@ -73,11 +71,8 @@ buildGoPackage rec {
dontWrapGApps = true;
buildInputs = [
go-dbus-factory
go-gir-generator
go-lib
gtk3
alsa-lib
gtk3
libcanberra
libgudev
librsvg
@ -88,16 +83,15 @@ buildGoPackage rec {
buildPhase = ''
runHook preBuild
addToSearchPath GOPATH "${go-dbus-factory}/share/gocode"
addToSearchPath GOPATH "${go-gir-generator}/share/gocode"
addToSearchPath GOPATH "${go-lib}/share/gocode"
make -C go/src/${goPackagePath}
make GOBUILD_OPTIONS="$GOFLAGS"
runHook postBuild
'';
doCheck = false;
installPhase = ''
runHook preInstall
make install DESTDIR="$out" PREFIX="/" -C go/src/${goPackagePath}
make install DESTDIR="$out" PREFIX="/"
runHook postInstall
'';

View File

@ -1,210 +0,0 @@
[
{
goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
fetch = {
type = "git";
url = "https://gopkg.in/alecthomas/kingpin.v2";
rev = "v2.2.6";
sha256 = "sha256-uViE2kPj7tMrGYVjjdLOl2jFDmmu+3P7GvnZBse2zVY=";
};
}
{
goPackagePath = "github.com/disintegration/imaging";
fetch = {
type = "git";
url = "https://github.com/disintegration/imaging";
rev = "v1.6.2";
sha256 = "sha256-pSeMTPvSkxlthh65LjNYYhPLvCZDkBgVgAGYWW0Aguo=";
};
}
{
goPackagePath = "github.com/linuxdeepin/go-x11-client";
fetch = {
type = "git";
url = "https://github.com/linuxdeepin/go-x11-client";
rev = "0.6.9";
sha256 = "sha256-xXNaXpFFHJN1fCFLoVrQFCXQ4ya+Kga55QWcJL/InkA=";
};
}
{
goPackagePath = "github.com/mattn/go-sqlites";
fetch = {
type = "git";
url = "https://github.com/mattn/go-sqlite3";
rev = "v1.14.12";
sha256 = "sha256-SLW1FyyfJGPUid1epgmJHZGJebI77Wg5WMAPiz1GcYs=";
};
}
{
goPackagePath = "github.com/godbus/dbus";
fetch = {
type = "git";
url = "https://github.com/godbus/dbus";
rev = "v5.1.0";
sha256 = "sha256-JSPtmkGEStBEVrKGszeLCb7P38SzQKgMiDC3eDppXs0=";
};
}
{
goPackagePath = "github.com/fsnotify/fsnotify";
fetch = {
type = "git";
url = "https://github.com/fsnotify/fsnotify";
rev = "v1.5.1";
sha256 = "sha256-B8kZ8yiWgallT7R2j1kSRJcJkSGFVf9ise+TpXa+7XY=";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://github.com/golang/sys";
rev = "289d7a0edf712062d9f1484b07bdf2383f48802f";
sha256 = "sha256-AzS/J3OocI7mA0xsIfQzyskNKVija7F2yvuts+EFJBs=";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.7.1";
sha256 = "sha256-disUVIHiIDSj/go3APtJH8awSl8QwKRRFLKI7LRnl0w=";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.1";
sha256 = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "5d4384ee4fb2527b0a1256a821ebfc92f91efefc";
sha256 = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.3.0";
sha256 = "sha256-T753/EiD5Cpk6H2JFhd+s1gFvpNptG2XlEHxZF6dQaw=";
};
}
{
goPackagePath = "gopkg.in/yaml.v3";
fetch = {
type = "git";
url = "https://github.com/go-yaml/yaml";
rev = "496545a6307b2a7d7a710fd516e5e16e8ab62dbc";
sha256 = "sha256-j8yDji+vqsitpRZirpb4w/Em8nstgf28wpwkcrOlxBk=";
};
}
{
goPackagePath = "golang.org/x/image";
fetch = {
type = "git";
url = "https://github.com/golang/image";
rev = "a8550c1d254a56cf1762a2993881d2b23c0c83dd";
sha256 = "sha256-gtRGCsCe8tKLsZWhKLL8c5whz9rCMoCHfH13rcSW/OM=";
};
}
{
goPackagePath = "github.com/alecthomas/units";
fetch = {
type = "git";
url = "https://github.com/alecthomas/units";
rev = "b94a6e3cc13755c0a75fffecbb089eb346fc4289";
sha256 = "sha256-uriYmwxT69xbmWKO/5OAyeMa2lFBOJDrU2KtQh/+ZjY=";
};
}
{
goPackagePath = "github.com/alecthomas/template";
fetch = {
type = "git";
url = "https://github.com/alecthomas/template";
rev = "fb15b899a75114aa79cc930e33c46b577cc664b1";
sha256 = "sha256-RsS4qxdRQ3q+GejA8D9Iu31A/mZNms4LbJ7518jWiu4=";
};
}
{
goPackagePath = "github.com/cryptix/wav";
fetch = {
type = "git";
url = "https://github.com/cryptix/wav";
rev = "8bdace674401f0bd3b63c65479b6a6ff1f9d5e44";
sha256 = "sha256-psUCHRFGEOpN3obFbCvSfW0AGEFSI29d0q4MFsHG3qI=";
};
}
{
goPackagePath = "github.com/fogleman/gg";
fetch = {
type = "git";
url = "https://github.com/fogleman/gg";
rev = "v1.3.0";
sha256 = "sha256-Fs2JI0FmF4N5EzXJzGAPZMxZxo6wKyebkN/iBZ9sdNo=";
};
}
{
goPackagePath = "github.com/golang/freetype";
fetch = {
type = "git";
url = "https://github.com/golang/freetype";
rev = "e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4";
sha256 = "sha256-rOOsv1sNLbYEKnwXZtUlB2CXVkFANyzZy2E7w2QbnKQ=";
};
}
{
goPackagePath = "github.com/gosexy/gettext";
fetch = {
type = "git";
url = "https://github.com/gosexy/gettext";
rev = "74466a0a0c4a62fea38f44aa161d4bbfbe79dd6b";
sha256 = "sha256-8U2oSi446U13c3uqcbg/14okypxKmckRuvWfZlGHVys=";
};
}
{
goPackagePath = "github.com/nfnt/resize";
fetch = {
type = "git";
url = "https://github.com/nfnt/resize";
rev = "83c6a9932646f83e3267f353373d47347b6036b2";
sha256 = "sha256-yvPV+HlDOyJsiwAcVHQkmtw8DHSXyw+cXHkigXm8rAA=";
};
}
{
goPackagePath = "github.com/youpy/go-wav";
fetch = {
type = "git";
url = "https://github.com/youpy/go-wav";
rev = "v0.3.2";
sha256 = "sha256-jNqXW3F3fcgjT47+d2MVXauWkA7+1KfYVu3ZZpRCTkM=";
};
}
{
goPackagePath = "github.com/zaf/g711";
fetch = {
type = "git";
url = "https://github.com/zaf/g711";
rev = "v1.2";
sha256 = "sha256-G+0cgGw/fcOUFVn32AeqUE0YjyOS82Z5MTcn6IANhCY=";
};
}
{
goPackagePath = "github.com/youpy/go-riff";
fetch = {
type = "git";
url = "https://github.com/youpy/go-riff";
rev = "v0.1.0";
sha256 = "sha256-d/3rkxDeRTPveZblArKc61gB4LJVV08n7g0THieuhx8=";
};
}
]

View File

@ -0,0 +1,15 @@
diff --git a/grub2/modify_manger.go b/grub2/modify_manger.go
index a811770b..30e9561e 100644
--- a/grub2/modify_manger.go
+++ b/grub2/modify_manger.go
@@ -21,7 +21,6 @@ const (
)
func init() {
- _ = os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
}
type modifyManager struct {
--
2.39.2

View File

@ -1,33 +0,0 @@
From ad18742c699a08cd82f8926a31da9a19b2aef329 Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Wed, 5 Apr 2023 23:37:24 +0800
Subject: [PATCH 1/4] fix-wrapped-name-for-verifyExe
---
dock/process_info.go | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dock/process_info.go b/dock/process_info.go
index 83c61d58..e2970f3a 100644
--- a/dock/process_info.go
+++ b/dock/process_info.go
@@ -119,6 +119,16 @@ func verifyExe(exe, cwd, firstArg string) bool {
return false
}
logger.Debugf("firstArgPath: %q", firstArgPath)
+ if exe == firstArgPath {
+ return true
+ }
+ if strings.HasSuffix(exe, "-wrapped") {
+ exeBase := filepath.Base(exe)
+ if (len(exeBase) <= 9) {
+ return false
+ }
+ exe = exe[0:len(exe)-len(exeBase)] + exeBase[1:len(exeBase)-8]
+ }
return exe == firstArgPath
}
--
2.39.2

View File

@ -1,40 +0,0 @@
From 7fe41aac7c31f6143b5f5887dbefa41fdf4c252b Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Wed, 5 Apr 2023 23:37:49 +0800
Subject: [PATCH 2/4] dont-set-PATH
---
bin/dde-system-daemon/main.go | 4 ----
grub2/modify_manger.go | 1 -
2 files changed, 5 deletions(-)
diff --git a/bin/dde-system-daemon/main.go b/bin/dde-system-daemon/main.go
index 03d2a415..cf92f065 100644
--- a/bin/dde-system-daemon/main.go
+++ b/bin/dde-system-daemon/main.go
@@ -77,10 +77,6 @@ func main() {
// fix no PATH when was launched by dbus
if os.Getenv("PATH") == "" {
logger.Warning("No PATH found, manual special")
- err = os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
- if err != nil {
- logger.Warning(err)
- }
}
// 系统级服务无需设置LANG和LANGUAGE保证翻译不受到影响
diff --git a/grub2/modify_manger.go b/grub2/modify_manger.go
index a811770b..30e9561e 100644
--- a/grub2/modify_manger.go
+++ b/grub2/modify_manger.go
@@ -21,7 +21,6 @@ const (
)
func init() {
- _ = os.Setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
}
type modifyManager struct {
--
2.39.2

View File

@ -1,5 +1,5 @@
diff --git a/bin/dde-system-daemon/wallpaper.go b/bin/dde-system-daemon/wallpaper.go
index d4af13da..1ff36f84 100644
index 6ee26e27..67dc77dc 100644
--- a/bin/dde-system-daemon/wallpaper.go
+++ b/bin/dde-system-daemon/wallpaper.go
@@ -24,7 +24,7 @@ import (
@ -20,3 +20,6 @@ index d4af13da..1ff36f84 100644
"-c",
"0",
file,
--
2.40.1

View File

@ -0,0 +1,116 @@
diff --git a/accounts1/user.go b/accounts1/user.go
index 8101d9c6..16c7f15f 100644
--- a/accounts1/user.go
+++ b/accounts1/user.go
@@ -482,7 +482,7 @@ func (u *User) checkIsControlCenter(sender dbus.Sender) bool {
return false
}
- if exe == controlCenterPath {
+ if strings.Contains(exe, "dde-control-center") {
return true
}
diff --git a/accounts1/user_chpwd_union_id.go b/accounts1/user_chpwd_union_id.go
index 61a691d9..47d2163e 100644
--- a/accounts1/user_chpwd_union_id.go
+++ b/accounts1/user_chpwd_union_id.go
@@ -89,14 +89,13 @@ func newCaller(service *dbusutil.Service, sender dbus.Sender) (ret *caller, err
// 只允许来自控制中心, 锁屏和 greetter 的调用
var app string
- switch exe {
- case "/usr/bin/dde-control-center":
+ if (strings.Contains(exe, "dde-control-center")) {
app = "control-center"
- case "/usr/bin/dde-lock":
+ } else if (strings.Contains(exe, "dde-lock")) {
app = "lock"
- case "/usr/bin/lightdm-deepin-greeter":
+ } else if (strings.Contains(exe, "lightdm-deepin-greeter")) {
app = "greeter"
- default:
+ } else {
err = fmt.Errorf("set password with Union ID called by %s, which is not allow", exe)
return
}
diff --git a/bin/dde-authority/fprint_transaction.go b/bin/dde-authority/fprint_transaction.go
index ca2951a0..3223ad25 100644
--- a/bin/dde-authority/fprint_transaction.go
+++ b/bin/dde-authority/fprint_transaction.go
@@ -461,7 +461,7 @@ func (tx *FPrintTransaction) End(sender dbus.Sender) *dbus.Error {
func killFPrintDaemon() {
logger.Debug("kill fprintd")
- err := exec.Command("pkill", "-f", "/usr/lib/fprintd/fprintd").Run()
+ err := exec.Command("pkill", "fprintd").Run()
if err != nil {
logger.Warning("failed to kill fprintd:", err)
}
diff --git a/grub2/grub2.go b/grub2/grub2.go
index 085b7157..10cb8256 100644
--- a/grub2/grub2.go
+++ b/grub2/grub2.go
@@ -603,7 +603,7 @@ func checkInvokePermission(service *dbusutil.Service, sender dbus.Sender) error
if err != nil {
return err
}
- if cmd == "/usr/bin/dde-control-center" {
+ if strings.Contains(cmd, "dde-control-center") {
return nil
}
uid, err := service.GetConnUID(string(sender))
diff --git a/misc/etc/acpi/powerbtn.sh b/misc/etc/acpi/powerbtn.sh
index 5c536b9e..39c28987 100755
--- a/misc/etc/acpi/powerbtn.sh
+++ b/misc/etc/acpi/powerbtn.sh
@@ -58,4 +58,4 @@ elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then
fi
# If all else failed, just initiate a plain shutdown.
-/sbin/shutdown -h now "Power button pressed"
+shutdown -h now "Power button pressed"
diff --git a/misc/udev-rules/80-deepin-fprintd.rules b/misc/udev-rules/80-deepin-fprintd.rules
index 7063a40c..c4c6103a 100644
--- a/misc/udev-rules/80-deepin-fprintd.rules
+++ b/misc/udev-rules/80-deepin-fprintd.rules
@@ -1 +1 @@
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ACTION=="add|remove", ENV{LIBFPRINT_DRIVER}!="", RUN+="/usr/bin/dbus-send --system --dest=org.deepin.dde.Fprintd1 --print-reply /org/deepin/dde/Fprintd1 org.deepin.dde.Fprintd1.TriggerUDevEvent"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ACTION=="add|remove", ENV{LIBFPRINT_DRIVER}!="", RUN+="@dbus@/bin/dbus-send --system --dest=org.deepin.dde.Fprintd1 --print-reply /org/deepin/dde/Fprintd1 org.deepin.dde.Fprintd1.TriggerUDevEvent"
diff --git a/system/display/displaycfg.go b/system/display/displaycfg.go
index cda69a77..e394ae07 100644
--- a/system/display/displaycfg.go
+++ b/system/display/displaycfg.go
@@ -255,7 +255,7 @@ func (d *Display) doDetectSupportWayland(sender dbus.Sender) (bool, error) {
return false, err
}
var cmd *exec.Cmd
- if execPath == "/usr/bin/lightdm-deepin-greeter" {
+ if strings.Contains(execPath, "lightdm-deepin-greeter") {
cmd = exec.Command("runuser", "-u", "lightdm", "glxinfo") // runuser -u lightdm glxinfo
} else {
cmd = exec.Command("glxinfo")
diff --git a/system/power1/manager_lmt.go b/system/power1/manager_lmt.go
index 87556893..f67cb5b0 100644
--- a/system/power1/manager_lmt.go
+++ b/system/power1/manager_lmt.go
@@ -8,6 +8,7 @@ import (
"bufio"
"io/ioutil"
"os"
+ "os/exec"
"path/filepath"
"strings"
@@ -28,7 +29,7 @@ const (
const lowBatteryThreshold = 20.0
func isLaptopModeBinOk() bool {
- _, err := os.Stat(laptopModeBin)
+ _, err := exec.LookPath("laptop_mode")
return err == nil
}
--
2.40.1

View File

@ -1,254 +0,0 @@
From a0667a7e82b3176e64122f4d68c43de4fa350780 Mon Sep 17 00:00:00 2001
From: rewine <luhongxu@deepin.org>
Date: Tue, 18 Apr 2023 17:04:36 +0800
Subject: [PATCH 3/4] search-in-XDG-directories
---
accounts/manager.go | 5 ++++-
accounts/user.go | 8 +++++++-
appearance/fsnotify.go | 21 +++++++++++++++++----
appearance/ifc.go | 3 ++-
apps/utils.go | 3 ++-
gesture/config.go | 4 ++--
keybinding/shortcuts/system_shortcut.go | 4 +++-
mime/app_info.go | 7 ++++++-
system/gesture/config.go | 4 +++-
9 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/accounts/manager.go b/accounts/manager.go
index 22c26ce7..009d9dd9 100644
--- a/accounts/manager.go
+++ b/accounts/manager.go
@@ -15,6 +15,7 @@ import (
"sync"
"syscall"
+ "github.com/adrg/xdg"
dbus "github.com/godbus/dbus"
"github.com/linuxdeepin/dde-daemon/accounts/users"
"github.com/linuxdeepin/dde-daemon/common/sessionmsg"
@@ -35,8 +36,10 @@ const (
actConfigFile = actConfigDir + "/accounts.ini"
actConfigGroupGroup = "Accounts"
actConfigKeyGuest = "AllowGuest"
+)
- interfacesFile = "/usr/share/dde-daemon/accounts/dbus-udcp.json"
+var (
+ interfacesFile, _ = xdg.SearchDataFile("dde-daemon/accounts/dbus-udcp.json")
)
type InterfaceConfig struct {
diff --git a/accounts/user.go b/accounts/user.go
index 900033c6..f8827fb2 100644
--- a/accounts/user.go
+++ b/accounts/user.go
@@ -15,6 +15,7 @@ import (
"strings"
"sync"
+ "github.com/adrg/xdg"
dbus "github.com/godbus/dbus"
"github.com/linuxdeepin/dde-daemon/accounts/users"
authenticate "github.com/linuxdeepin/go-dbus-factory/com.deepin.daemon.authenticate"
@@ -649,7 +650,12 @@ func getUserSession(homeDir string) string {
}
func getSessionList() []string {
- fileInfoList, err := ioutil.ReadDir("/usr/share/xsessions")
+ xsessionPath, err := xdg.SearchDataFile("xsessions")
+ if err != nil {
+ return nil;
+ }
+
+ fileInfoList, err := ioutil.ReadDir(xsessionPath)
if err != nil {
return nil
}
diff --git a/appearance/fsnotify.go b/appearance/fsnotify.go
index a409d0ba..ff674600 100644
--- a/appearance/fsnotify.go
+++ b/appearance/fsnotify.go
@@ -5,12 +5,15 @@
package appearance
import (
+ "errors"
+ "io/fs"
"os"
"path"
"path/filepath"
"strings"
"time"
+ "github.com/adrg/xdg"
"github.com/fsnotify/fsnotify"
"github.com/linuxdeepin/dde-daemon/appearance/background"
"github.com/linuxdeepin/dde-daemon/appearance/subthemes"
@@ -100,9 +103,14 @@ func (m *Manager) watchGtkDirs() {
gtkDirs = []string{
path.Join(home, ".local/share/themes"),
path.Join(home, ".themes"),
- "/usr/local/share/themes",
- "/usr/share/themes",
}
+ for _, dataPath := range xdg.DataDirs {
+ gtkPath := filepath.Join(dataPath, "themes");
+ if _, err := os.Stat(gtkPath); err != nil && errors.Is(err, fs.ErrNotExist) {
+ continue
+ }
+ gtkDirs = append(gtkDirs, gtkPath);
+ }
m.watchDirs(gtkDirs)
}
@@ -112,9 +120,14 @@ func (m *Manager) watchIconDirs() {
iconDirs = []string{
path.Join(home, ".local/share/icons"),
path.Join(home, ".icons"),
- "/usr/local/share/icons",
- "/usr/share/icons",
}
+ for _, dataPath := range xdg.DataDirs {
+ iconPath := filepath.Join(dataPath, "icons");
+ if _, err := os.Stat(iconPath); err != nil && errors.Is(err, fs.ErrNotExist) {
+ continue
+ }
+ iconDirs = append(iconDirs, iconPath);
+ }
m.watchDirs(iconDirs)
}
diff --git a/appearance/ifc.go b/appearance/ifc.go
index f0bf32a3..6d60ffe4 100644
--- a/appearance/ifc.go
+++ b/appearance/ifc.go
@@ -10,6 +10,7 @@ import (
"strconv"
"strings"
+ "github.com/adrg/xdg"
"github.com/godbus/dbus"
"github.com/linuxdeepin/dde-daemon/appearance/fonts"
"github.com/linuxdeepin/dde-daemon/appearance/subthemes"
@@ -265,7 +266,7 @@ func (m *Manager) thumbnail(ty, name string) (string, error) {
case TypeGtkTheme:
fName, ok := gtkThumbnailMap[name]
if ok {
- return filepath.Join("/usr/share/dde-daemon/appearance", fName+".svg"), nil
+ return xdg.SearchDataFile(filepath.Join("dde-daemon/appearance", fName+".svg"))
}
return subthemes.GetGtkThumbnail(name)
case TypeIconTheme:
diff --git a/apps/utils.go b/apps/utils.go
index 8863d6c2..dd6f8e16 100644
--- a/apps/utils.go
+++ b/apps/utils.go
@@ -11,6 +11,7 @@ import (
"strconv"
"strings"
"syscall"
+ "github.com/adrg/xdg"
)
func intSliceContains(slice []int, a int) bool {
@@ -96,7 +97,7 @@ func removeDesktopExt(name string) string {
}
func getSystemDataDirs() []string {
- return []string{"/usr/share", "/usr/local/share"}
+ return xdg.DataDirs
}
// get user home
diff --git a/gesture/config.go b/gesture/config.go
index bfbd4db7..4ce9d641 100644
--- a/gesture/config.go
+++ b/gesture/config.go
@@ -10,6 +10,7 @@ import (
"io/ioutil"
"path/filepath"
+ "github.com/adrg/xdg"
"github.com/linuxdeepin/go-lib/xdg/basedir"
)
@@ -21,11 +22,10 @@ const (
var (
configUserPath = filepath.Join(basedir.GetUserConfigDir(), "deepin/dde-daemon/gesture.json")
+ configSystemPath, _ = xdg.SearchDataFile("dde-daemon/gesture.json")
)
const (
- configSystemPath = "/usr/share/dde-daemon/gesture.json"
-
gestureSchemaId = "com.deepin.dde.gesture"
gsKeyTouchPadEnabled = "touch-pad-enabled"
gsKeyTouchScreenEnabled = "touch-screen-enabled"
diff --git a/keybinding/shortcuts/system_shortcut.go b/keybinding/shortcuts/system_shortcut.go
index eaec22b5..95e1b222 100644
--- a/keybinding/shortcuts/system_shortcut.go
+++ b/keybinding/shortcuts/system_shortcut.go
@@ -10,6 +10,7 @@ import (
"path"
"sync"
+ "github.com/adrg/xdg"
dutils "github.com/linuxdeepin/go-lib/utils"
)
@@ -152,5 +153,6 @@ func getSystemActionsFile() string {
return file
}
- return ""
+ filepath, _ := xdg.SearchDataFile(systemActionsFile)
+ return filepath;
}
diff --git a/mime/app_info.go b/mime/app_info.go
index 63fcdcc0..18436164 100644
--- a/mime/app_info.go
+++ b/mime/app_info.go
@@ -9,6 +9,7 @@ import (
"os"
"path"
+ "github.com/adrg/xdg"
"github.com/linuxdeepin/go-lib/appinfo/desktopappinfo"
"github.com/linuxdeepin/go-lib/mime"
dutils "github.com/linuxdeepin/go-lib/utils"
@@ -162,5 +163,9 @@ func findFilePath(file string) string {
return data
}
- return path.Join("/usr/share", file)
+ filepath, err := xdg.SearchDataFile(file)
+ if err != nil {
+ return path.Join("/usr/share", file)
+ }
+ return filepath;
}
diff --git a/system/gesture/config.go b/system/gesture/config.go
index d4aebaac..f3fc92c3 100644
--- a/system/gesture/config.go
+++ b/system/gesture/config.go
@@ -8,6 +8,7 @@ import (
"encoding/json"
"io/ioutil"
+ "github.com/adrg/xdg"
"github.com/linuxdeepin/go-lib/utils"
)
@@ -35,5 +36,6 @@ func getConfigPath() string {
if utils.IsFileExist(filename) {
return filename
}
- return "/usr/share/" + suffix
+ filepath, _ := xdg.SearchDataFile(suffix)
+ return filepath;
}
--
2.38.1

View File

@ -1,323 +0,0 @@
From 12a5ccce245f82c334e78d48354e55311c15fb0c Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Wed, 5 Apr 2023 23:51:58 +0800
Subject: [PATCH 4/4] aviod-use-hardcode-path
---
accounts/user.go | 2 +-
accounts/user_chpwd_union_id.go | 9 ++++-----
bin/backlight_helper/ddcci/ddcci.go | 20 +++++--------------
bin/dde-authority/fprint_transaction.go | 2 +-
inputdevices/keyboard.go | 5 +++--
keybinding/shortcuts/system_shortcut.go | 6 +++---
keybinding/special_keycode.go | 2 +-
keybinding/utils.go | 2 +-
launcher/manager_ifc.go | 2 +-
.../dde-daemon/keybinding/system_actions.json | 4 ++--
misc/etc/acpi/powerbtn.sh | 2 +-
misc/udev-rules/80-deepin-fprintd.rules | 2 +-
system/display/displaycfg.go | 2 +-
system/power/manager_lmt.go | 3 ++-
system/power_manager/utils.go | 2 +-
system/systeminfo/manager.go | 2 +-
systeminfo/utils.go | 2 +-
17 files changed, 30 insertions(+), 39 deletions(-)
diff --git a/accounts/user.go b/accounts/user.go
index f8827fb2..ff604f38 100644
--- a/accounts/user.go
+++ b/accounts/user.go
@@ -450,7 +450,7 @@ func (u *User) checkIsControlCenter(sender dbus.Sender) bool {
return false
}
- if exe == controlCenterPath {
+ if strings.Contains(exe, "dde-control-center") {
return true
}
diff --git a/accounts/user_chpwd_union_id.go b/accounts/user_chpwd_union_id.go
index b0ba9cb9..e8aa1a1e 100644
--- a/accounts/user_chpwd_union_id.go
+++ b/accounts/user_chpwd_union_id.go
@@ -107,14 +107,13 @@ func newCaller(service *dbusutil.Service, sender dbus.Sender) (ret *caller, err
// 只允许来自控制中心, 锁屏和 greetter 的调用
var app string
- switch exe {
- case "/usr/bin/dde-control-center":
+ if (strings.Contains(exe, "dde-control-center")) {
app = "control-center"
- case "/usr/bin/dde-lock":
+ } else if (strings.Contains(exe, "dde-lock")) {
app = "lock"
- case "/usr/bin/lightdm-deepin-greeter":
+ } else if (strings.Contains(exe, "lightdm-deepin-greeter")) {
app = "greeter"
- default:
+ } else {
err = fmt.Errorf("set password with Union ID called by %s, which is not allow", exe)
return
}
diff --git a/bin/backlight_helper/ddcci/ddcci.go b/bin/backlight_helper/ddcci/ddcci.go
index 21653459..01a67e91 100644
--- a/bin/backlight_helper/ddcci/ddcci.go
+++ b/bin/backlight_helper/ddcci/ddcci.go
@@ -15,10 +15,7 @@ import (
"bytes"
"encoding/base64"
"fmt"
- "os/exec"
- "path/filepath"
"reflect"
- "strings"
"sync"
"unsafe"
@@ -113,18 +110,11 @@ func newDDCCI() (*ddcci, error) {
return nil, err
}
- content, err := exec.Command("/usr/bin/dpkg-architecture", "-qDEB_HOST_MULTIARCH").Output() // TODO: arch和rpm打包需要通过patch修改获取路径的方式
- if err != nil {
- logger.Warning(err)
- } else {
- path := filepath.Join("/usr/lib", strings.TrimSpace(string(content)), "libddcutil.so.0")
- logger.Debug("so path:", path)
- cStr := C.CString(path)
- defer C.free(unsafe.Pointer(cStr))
- ret := C.InitDDCCISo(cStr)
- if ret == -2 {
- logger.Debug("failed to initialize ddca_free_all_displays sym")
- }
+ cStr := C.CString("libddcutil.so.0")
+ defer C.free(unsafe.Pointer(cStr))
+ ret := C.InitDDCCISo(cStr)
+ if ret == -2 {
+ logger.Debug("failed to initialize ddca_free_all_displays sym")
}
return ddc, nil
diff --git a/bin/dde-authority/fprint_transaction.go b/bin/dde-authority/fprint_transaction.go
index 0e460ec3..b803d1c9 100644
--- a/bin/dde-authority/fprint_transaction.go
+++ b/bin/dde-authority/fprint_transaction.go
@@ -461,7 +461,7 @@ func (tx *FPrintTransaction) End(sender dbus.Sender) *dbus.Error {
func killFPrintDaemon() {
logger.Debug("kill fprintd")
- err := exec.Command("pkill", "-f", "/usr/lib/fprintd/fprintd").Run()
+ err := exec.Command("pkill", "fprintd").Run()
if err != nil {
logger.Warning("failed to kill fprintd:", err)
}
diff --git a/inputdevices/keyboard.go b/inputdevices/keyboard.go
index 6d05f662..ca29cecc 100644
--- a/inputdevices/keyboard.go
+++ b/inputdevices/keyboard.go
@@ -10,6 +10,7 @@ import (
"fmt"
"os"
"os/user"
+ "os/exec"
"path"
"regexp"
"strings"
@@ -51,7 +52,7 @@ const (
kbdSystemConfig = "/etc/default/keyboard"
qtDefaultConfig = ".config/Trolltech.conf"
- cmdSetKbd = "/usr/bin/setxkbmap"
+ cmdSetKbd = "setxkbmap"
)
type Keyboard struct {
@@ -704,7 +705,7 @@ func (kbd *Keyboard) handlePropertyNotifyEvent(ev *x.PropertyNotifyEvent) {
}
func (kbd *Keyboard) shouldUseDDEKwin() bool {
- _, err := os.Stat("/usr/bin/kwin_no_scale")
+ _, err := exec.LookPath("kwin_no_scale")
return err == nil
}
diff --git a/keybinding/shortcuts/system_shortcut.go b/keybinding/shortcuts/system_shortcut.go
index 95e1b222..95d82db7 100644
--- a/keybinding/shortcuts/system_shortcut.go
+++ b/keybinding/shortcuts/system_shortcut.go
@@ -83,10 +83,10 @@ var defaultSysActionCmdMap = map[string]string{
"launcher": "dbus-send --print-reply --dest=com.deepin.dde.Launcher /com/deepin/dde/Launcher com.deepin.dde.Launcher.Toggle",
"terminal": "/usr/lib/deepin-daemon/default-terminal",
"terminal-quake": "deepin-terminal --quake-mode",
- "lock-screen": "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');/usr/bin/setxkbmap -option grab:break_actions&&/usr/bin/xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/lockFront com.deepin.dde.lockFront.Show&&/usr/bin/setxkbmap -option; setxkbmap -option $originmap",
+ "lock-screen": "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');setxkbmap -option grab:break_actions&&xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/lockFront com.deepin.dde.lockFront.Show&&/usr/bin/setxkbmap -option; setxkbmap -option $originmap",
"logout": "dbus-send --print-reply --dest=com.deepin.dde.shutdownFront /com/deepin/dde/shutdownFront com.deepin.dde.shutdownFront.Show",
"deepin-screen-recorder": "dbus-send --print-reply --dest=com.deepin.ScreenRecorder /com/deepin/ScreenRecorder com.deepin.ScreenRecorder.stopRecord",
- "system-monitor": "/usr/bin/deepin-system-monitor",
+ "system-monitor": "deepin-system-monitor",
"color-picker": "dbus-send --print-reply --dest=com.deepin.Picker /com/deepin/Picker com.deepin.Picker.Show",
// screenshot actions:
"screenshot": screenshotCmdPrefix + "StartScreenshot",
@@ -104,7 +104,7 @@ var defaultSysActionCmdMap = map[string]string{
"global-search": "/usr/libexec/dde-daemon/keybinding/shortcut-dde-grand-search.sh",
"switch-next-kbd-layout": "dbus-send --print-reply --dest=com.deepin.daemon.Keybinding /com/deepin/daemon/InputDevice/Keyboard com.deepin.daemon.InputDevice.Keyboard.ToggleNextLayout",
// cmd
- "calculator": "/usr/bin/deepin-calculator",
+ "calculator": "deepin-calculator",
"search": "/usr/libexec/dde-daemon/keybinding/shortcut-dde-grand-search.sh",
}
diff --git a/keybinding/special_keycode.go b/keybinding/special_keycode.go
index d18c9a66..9704b241 100644
--- a/keybinding/special_keycode.go
+++ b/keybinding/special_keycode.go
@@ -276,7 +276,7 @@ func (m *Manager) handlePower() {
}
m.systemTurnOffScreen()
case powerActionShowUI:
- cmd := "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');/usr/bin/setxkbmap -option grab:break_actions&&/usr/bin/xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/shutdownFront com.deepin.dde.shutdownFront.Show&&/usr/bin/setxkbmap -option; setxkbmap -option $originmap"
+ cmd := "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');setxkbmap -option grab:break_actions&&xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/shutdownFront com.deepin.dde.shutdownFront.Show&&setxkbmap -option; setxkbmap -option $originmap"
go func() {
locked, err := m.sessionManager.Locked().Get(0)
if err != nil {
diff --git a/keybinding/utils.go b/keybinding/utils.go
index 8e531369..261c88e8 100644
--- a/keybinding/utils.go
+++ b/keybinding/utils.go
@@ -311,7 +311,7 @@ func readTinyFile(file string) ([]byte, error) {
}
func shouldUseDDEKwin() bool {
- _, err := os.Stat("/usr/bin/kwin_no_scale")
+ _, err := exec.LookPath("kwin_no_scale")
return err == nil
}
diff --git a/launcher/manager_ifc.go b/launcher/manager_ifc.go
index 440aa8e5..ad74f99f 100644
--- a/launcher/manager_ifc.go
+++ b/launcher/manager_ifc.go
@@ -24,7 +24,7 @@ const (
dbusObjPath = "/com/deepin/dde/daemon/Launcher"
dbusInterface = dbusServiceName
desktopMainSection = "Desktop Entry"
- launcherExecPath = "/usr/bin/dde-launcher"
+ launcherExecPath = "dde-launcher"
)
var errorInvalidID = errors.New("invalid ID")
diff --git a/misc/dde-daemon/keybinding/system_actions.json b/misc/dde-daemon/keybinding/system_actions.json
index 8de3f111..8048048e 100644
--- a/misc/dde-daemon/keybinding/system_actions.json
+++ b/misc/dde-daemon/keybinding/system_actions.json
@@ -13,7 +13,7 @@
"Action": "dbus-send --print-reply --dest=com.deepin.ScreenRecorder /com/deepin/ScreenRecorder com.deepin.ScreenRecorder.stopRecord"
},
{
- "Action": "/usr/bin/deepin-system-monitor",
+ "Action": "deepin-system-monitor",
"Key": "system-monitor"
},
{
@@ -21,7 +21,7 @@
"Action": "dbus-send --print-reply --dest=com.deepin.Picker /com/deepin/Picker com.deepin.Picker.Show"
},
{
- "Action": "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');/usr/bin/setxkbmap -option grab:break_actions&&/usr/bin/xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/lockFront com.deepin.dde.lockFront.Show&&/usr/bin/setxkbmap -option; setxkbmap -option $originmap",
+ "Action": "originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');setxkbmap -option grab:break_actions&&xdotool key XF86Ungrab&&dbus-send --print-reply --dest=com.deepin.dde.lockFront /com/deepin/dde/lockFront com.deepin.dde.lockFront.Show&&setxkbmap -option; setxkbmap -option $originmap",
"Key": "lock-screen"
},
{
diff --git a/misc/etc/acpi/powerbtn.sh b/misc/etc/acpi/powerbtn.sh
index 5c536b9e..39c28987 100755
--- a/misc/etc/acpi/powerbtn.sh
+++ b/misc/etc/acpi/powerbtn.sh
@@ -58,4 +58,4 @@ elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then
fi
# If all else failed, just initiate a plain shutdown.
-/sbin/shutdown -h now "Power button pressed"
+shutdown -h now "Power button pressed"
diff --git a/misc/udev-rules/80-deepin-fprintd.rules b/misc/udev-rules/80-deepin-fprintd.rules
index d3d3554a..9163b91c 100644
--- a/misc/udev-rules/80-deepin-fprintd.rules
+++ b/misc/udev-rules/80-deepin-fprintd.rules
@@ -1 +1 @@
-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ACTION=="add|remove", ENV{LIBFPRINT_DRIVER}!="" RUN+="/usr/bin/dbus-send --system --dest=com.deepin.daemon.Fprintd --print-reply /com/deepin/daemon/Fprintd com.deepin.daemon.Fprintd.TriggerUDevEvent"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ACTION=="add|remove", ENV{LIBFPRINT_DRIVER}!="" RUN+="@dbus@/bin/dbus-send --system --dest=com.deepin.daemon.Fprintd --print-reply /com/deepin/daemon/Fprintd com.deepin.daemon.Fprintd.TriggerUDevEvent"
diff --git a/system/display/displaycfg.go b/system/display/displaycfg.go
index 57b5871a..5b7757b4 100644
--- a/system/display/displaycfg.go
+++ b/system/display/displaycfg.go
@@ -255,7 +255,7 @@ func (d *Display) doDetectSupportWayland(sender dbus.Sender) (bool, error) {
return false, err
}
var cmd *exec.Cmd
- if execPath == "/usr/bin/lightdm-deepin-greeter" {
+ if strings.Contains(execPath, "lightdm-deepin-greeter") {
cmd = exec.Command("runuser", "-u", "lightdm", "glxinfo") // runuser -u lightdm glxinfo
} else {
cmd = exec.Command("glxinfo")
diff --git a/system/power/manager_lmt.go b/system/power/manager_lmt.go
index e2bdb2af..baf32fbd 100644
--- a/system/power/manager_lmt.go
+++ b/system/power/manager_lmt.go
@@ -8,6 +8,7 @@ import (
"bufio"
"io/ioutil"
"os"
+ "os/exec"
"path/filepath"
"strings"
@@ -28,7 +29,7 @@ const (
const lowBatteryThreshold = 20.0
func isLaptopModeBinOk() bool {
- _, err := os.Stat(laptopModeBin)
+ _, err := exec.LookPath("laptop_mode")
return err == nil
}
diff --git a/system/power_manager/utils.go b/system/power_manager/utils.go
index 93f433c2..ef603c96 100644
--- a/system/power_manager/utils.go
+++ b/system/power_manager/utils.go
@@ -33,7 +33,7 @@ func canSuspend() bool {
}
func detectVirtualMachine() (string, error) {
- out, err := exec.Command("/usr/bin/systemd-detect-virt").Output()
+ out, err := exec.Command("systemd-detect-virt").Output()
if err != nil {
return "", err
}
diff --git a/system/systeminfo/manager.go b/system/systeminfo/manager.go
index 5525ae36..daab2c44 100644
--- a/system/systeminfo/manager.go
+++ b/system/systeminfo/manager.go
@@ -205,7 +205,7 @@ func filterUnNumber(value string) string {
//执行命令:/usr/bin/getconf LONG_BIT 获取系统位数
func (m *Manager) systemBit() string {
- output, err := exec.Command("/usr/bin/getconf", "LONG_BIT").Output()
+ output, err := exec.Command("getconf", "LONG_BIT").Output()
if err != nil {
return "64"
}
diff --git a/systeminfo/utils.go b/systeminfo/utils.go
index ed17aeb8..e919fb53 100644
--- a/systeminfo/utils.go
+++ b/systeminfo/utils.go
@@ -39,7 +39,7 @@ func getMemoryFromFile(file string) (uint64, error) {
//执行命令:/usr/bin/getconf LONG_BIT 获取系统位数
func systemBit() string {
- output, err := exec.Command("/usr/bin/getconf", "LONG_BIT").Output()
+ output, err := exec.Command("getconf", "LONG_BIT").Output()
if err != nil {
return "64"
}
--
2.39.2

View File

@ -2,16 +2,12 @@
, lib
, fetchFromGitHub
, substituteAll
, buildGoPackage
, buildGoModule
, pkg-config
, deepin-gettext-tools
, gettext
, python3
, wrapGAppsHook
, go-dbus-factory
, go-gir-generator
, go-lib
, dde-api
, ddcutil
, alsa-lib
, glib
@ -32,62 +28,57 @@
, xdotool
, getconf
, dbus
, coreutils
, util-linux
, dde-session-ui
, coreutils
, lshw
, dmidecode
, systemd
}:
buildGoPackage rec {
buildGoModule rec {
pname = "dde-daemon";
version = "5.14.122";
goPackagePath = "github.com/linuxdeepin/dde-daemon";
version = "6.0.22";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-KoYMv4z4IGBH0O422PuFHrIgDBEkU08Vepax+00nrGE=";
hash = "sha256-D7s6wWZeZHYl/aP/0qLYNn+lZEwGJAjFNbO0whKymck=";
};
vendorHash = "sha256-U+G5CELpor34RgFzHpxfvJ/jBfWfE4ShjY2b2Z61BhE=";
patches = [
./0001-fix-wrapped-name-for-verifyExe.patch
./0002-dont-set-PATH.patch
./0003-search-in-XDG-directories.patch
./0001-dont-set-PATH.diff
(substituteAll {
src = ./0004-aviod-use-hardcode-path.patch;
inherit dbus;
})
(substituteAll {
src = ./0005-fix-custom-wallpapers-path.diff;
src = ./0002-fix-custom-wallpapers-path.diff;
inherit coreutils;
})
./0006-fix-build-with-ddcutil-2.patch
(substituteAll {
src = ./0003-aviod-use-hardcode-path.diff;
inherit dbus;
})
./0004-fix-build-with-ddcutil-2.patch
];
postPatch = ''
substituteInPlace dock/desktop_file_path.go \
--replace "/usr/share" "/run/current-system/sw/share"
substituteInPlace session/eventlog/{app_event.go,login_event.go} accounts/users/users_test.go \
substituteInPlace session/eventlog/{app_event.go,login_event.go} \
--replace "/bin/bash" "${runtimeShell}"
substituteInPlace inputdevices/layout_list.go \
--replace "/usr/share/X11/xkb" "${xkeyboard_config}/share/X11/xkb"
substituteInPlace system/uadp/crypto.go \
--replace "/usr/share/uadp" "/var/lib/dde-daemon/uadp"
substituteInPlace appearance/background/{background.go,custom_wallpapers.go} accounts/user.go \
substituteInPlace bin/dde-system-daemon/wallpaper.go accounts1/user.go \
--replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
substituteInPlace appearance/manager.go timedate/zoneinfo/zone.go \
substituteInPlace timedate1/zoneinfo/zone.go \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
substituteInPlace accounts/image_blur.go grub2/modify_manger.go \
substituteInPlace accounts1/image_blur.go grub2/modify_manger.go \
--replace "/usr/lib/deepin-api" "/run/current-system/sw/lib/deepin-api"
substituteInPlace accounts/user_chpwd_union_id.go \
substituteInPlace accounts1/user_chpwd_union_id.go \
--replace "/usr/lib/dde-control-center" "/run/current-system/sw/lib/dde-control-center"
for file in $(grep "/usr/lib/deepin-daemon" * -nR |awk -F: '{print $1}')
@ -98,8 +89,6 @@ buildGoPackage rec {
patchShebangs .
'';
goDeps = ./deps.nix;
nativeBuildInputs = [
pkg-config
deepin-gettext-tools
@ -109,10 +98,6 @@ buildGoPackage rec {
];
buildInputs = [
go-dbus-factory
go-gir-generator
go-lib
dde-api
ddcutil
linux-pam
libxcrypt
@ -132,33 +117,31 @@ buildGoPackage rec {
buildPhase = ''
runHook preBuild
addToSearchPath GOPATH "${go-dbus-factory}/share/gocode"
addToSearchPath GOPATH "${go-gir-generator}/share/gocode"
addToSearchPath GOPATH "${go-lib}/share/gocode"
addToSearchPath GOPATH "${dde-api}/share/gocode"
make -C go/src/${goPackagePath}
make GOBUILD_OPTIONS="$GOFLAGS"
runHook postBuild
'';
installPhase = ''
runHook preInstall
make install DESTDIR="$out" PREFIX="/" -C go/src/${goPackagePath}
make install DESTDIR="$out" PREFIX="/"
runHook postInstall
'';
doCheck = false;
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : "${lib.makeBinPath [ util-linux dde-session-ui ]}"
--prefix PATH : "${lib.makeBinPath [ util-linux dde-session-ui glib lshw dmidecode systemd ]}"
)
'';
postFixup = ''
for f in "$out"/lib/deepin-daemon/*; do
echo "Wrapping $f"
wrapGApp "$f"
for binary in $out/lib/deepin-daemon/*; do
if [ "$binary" == "$out/lib/deepin-daemon/service-trigger" ] ; then
continue;
fi
wrapGApp $binary
done
mv $out/run/current-system/sw/lib/deepin-daemon/service-trigger $out/lib/deepin-daemon/
rm -r $out/run
'';
meta = with lib; {

View File

@ -1,290 +0,0 @@
[
{
goPackagePath = "github.com/fsnotify/fsnotify";
fetch = {
type = "git";
url = "https://github.com/fsnotify/fsnotify";
rev = "v1.5.1";
sha256 = "sha256-B8kZ8yiWgallT7R2j1kSRJcJkSGFVf9ise+TpXa+7XY=";
};
}
{
goPackagePath = "github.com/godbus/dbus";
fetch = {
type = "git";
url = "https://github.com/godbus/dbus";
rev = "v5.1.0";
sha256 = "sha256-JSPtmkGEStBEVrKGszeLCb7P38SzQKgMiDC3eDppXs0=";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.7.1";
sha256 = "sha256-disUVIHiIDSj/go3APtJH8awSl8QwKRRFLKI7LRnl0w=";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://github.com/golang/sys";
rev = "289d7a0edf712062d9f1484b07bdf2383f48802f";
sha256 = "sha256-AzS/J3OocI7mA0xsIfQzyskNKVija7F2yvuts+EFJBs=";
};
}
{
goPackagePath = "golang.org/x/xerrors";
fetch = {
type = "git";
url = "https://github.com/golang/xerrors";
rev = "2f41105eb62f341cfe208d06de4ee3bdd3a083da";
sha256 = "sha256-yZNeG+jcarcw/aOFhrhxWWE20r0P+/VJF4i/0JQfv1c=";
};
}
{
goPackagePath = "gopkg.in/yaml.v3";
fetch = {
type = "git";
url = "https://github.com/go-yaml/yaml";
rev = "496545a6307b2a7d7a710fd516e5e16e8ab62dbc";
sha256 = "sha256-j8yDji+vqsitpRZirpb4w/Em8nstgf28wpwkcrOlxBk=";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.1";
sha256 = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.3.0";
sha256 = "sha256-T753/EiD5Cpk6H2JFhd+s1gFvpNptG2XlEHxZF6dQaw=";
};
}
{
goPackagePath = "github.com/linuxdeepin/go-x11-client";
fetch = {
type = "git";
url = "https://github.com/linuxdeepin/go-x11-client";
rev = "0.6.9";
sha256 = "sha256-xXNaXpFFHJN1fCFLoVrQFCXQ4ya+Kga55QWcJL/InkA=";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "5d4384ee4fb2527b0a1256a821ebfc92f91efefc";
sha256 = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=";
};
}
{
goPackagePath = "github.com/axgle/mahonia";
fetch = {
type = "git";
url = "https://github.com/axgle/mahonia";
rev = "3358181d7394e26beccfae0ffde05193ef3be33a";
sha256 = "0b8wsrxmv8a0cqbnsg55lpf29pxy2zw8azvgh3ck664lqpcfybhq";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://github.com/golang/text";
rev = "v0.3.7";
sha256 = "sha256-XpIbgE6MxWwDQQcPXr2NIsE2cev2+CIabi566TYGfHY=";
};
}
{
goPackagePath = "golang.org/x/image";
fetch = {
type = "git";
url = "https://github.com/golang/image";
rev = "70e8d0d3baa9a699c3865c753cbfa8ae65bd86ce";
sha256 = "sha256-oMbDIke/qQ6cp7JLNsMusf7EIUfuj0WavFVfI0lxTDs=";
};
}
{
goPackagePath = "github.com/nfnt/resize";
fetch = {
type = "git";
url = "https://github.com/nfnt/resize";
rev = "83c6a9932646f83e3267f353373d47347b6036b2";
sha256 = "005cpiwq28krbjf0zjwpfh63rp4s4is58700idn24fs3g7wdbwya";
};
}
{
goPackagePath = "github.com/Lofanmi/pinyin-golang";
fetch = {
type = "git";
url = "https://github.com/Lofanmi/pinyin-golang";
rev = "1db892057f20c56a3286cc1517e0642dacbff54c";
sha256 = "sha256-nhO6AYZ3vc7nwgmmfTlE6m33caY9gGZoKiSYvFLqHQc=";
};
}
{
goPackagePath = "github.com/mozillazg/go-pinyin";
fetch = {
type = "git";
url = "https://github.com/mozillazg/go-pinyin";
rev = "8930bc1fcb5693689dc35d98ad2a4153662e34b1";
sha256 = "sha256-kuMNiWpPeqsIsFgYIOsffxUfwcLPaMZWdZRBJAMDVvA=";
};
}
{
goPackagePath = "github.com/kelvins/sunrisesunset";
fetch = {
type = "git";
url = "https://github.com/kelvins/sunrisesunset";
rev = "39fa1bd816d52927b4cfcab0a1535b17eafe0a3d";
sha256 = "sha256-awklKAW1YM3sWM21irbyu2sUMIo3kCOj12lzyVzDefw=";
};
}
{
goPackagePath = "github.com/cryptix/wav";
fetch = {
type = "git";
url = "https://github.com/cryptix/wav";
rev = "8bdace674401f0bd3b63c65479b6a6ff1f9d5e44";
sha256 = "18nyqv0ic35fs9fny8sj84c00vbxs8mnric6vr6yl42624fh5id6";
};
}
{
goPackagePath = "github.com/rickb777/date";
fetch = {
type = "git";
url = "https://github.com/rickb777/date";
rev = "v1.18";
sha256 = "sha256-8r8eFOF5dKtowE3dnjpSMIXJ/yX2IjiR7nZ/EApUZbA=";
};
}
{
goPackagePath = "github.com/rickb777/plural";
fetch = {
type = "git";
url = "https://github.com/rickb777/plural";
rev = "v1.4.1";
sha256 = "sha256-nhN+ApdfUie45L+M2OZAPtSoiIZ1pZ2UpDX/DePS6Yw=";
};
}
{
goPackagePath = "github.com/gosexy/gettext";
fetch = {
type = "git";
url = "https://github.com/gosexy/gettext";
rev = "v0.9";
sha256 = "0asphx8nd7zmp88wk6aakk5292np7yw73akvfdvlvs9q5r5ahkgi";
};
}
{
goPackagePath = "github.com/msteinert/pam";
fetch = {
type = "git";
url = "https://github.com/msteinert/pam";
rev = "v1.0.0";
sha256 = "sha256-Ji13ckPyZUBAovhK2hRHgf2LB1ieglX/XrIJBxVcsXc=";
};
}
{
goPackagePath = "github.com/youpy/go-wav";
fetch = {
type = "git";
url = "https://github.com/youpy/go-wav";
rev = "v0.3.2";
sha256 = "sha256-jNqXW3F3fcgjT47+d2MVXauWkA7+1KfYVu3ZZpRCTkM=";
};
}
{
goPackagePath = "github.com/zaf/g711";
fetch = {
type = "git";
url = "https://github.com/zaf/g711";
rev = "v1.2";
sha256 = "sha256-G+0cgGw/fcOUFVn32AeqUE0YjyOS82Z5MTcn6IANhCY=";
};
}
{
goPackagePath = "github.com/youpy/go-riff";
fetch = {
type = "git";
url = "https://github.com/youpy/go-riff";
rev = "v0.1.0";
sha256 = "sha256-d/3rkxDeRTPveZblArKc61gB4LJVV08n7g0THieuhx8=";
};
}
{
goPackagePath = "google.golang.org/protobuf";
fetch = {
type = "git";
url = "https://github.com/protocolbuffers/protobuf-go";
rev = "v1.28.1";
sha256 = "sha256-7Cg7fByLR9jX3OSCqJfLw5PAHDQi/gopkjtkbobnyWM";
};
}
{
goPackagePath = "github.com/mdlayher/netlink";
fetch = {
type = "git";
url = "https://github.com/mdlayher/netlink";
rev = "v1.6.0";
sha256 = "sha256-3pVOXscdUVerFlRW9aGz7/5YL2OWFkvm8AJGSxygkEs=";
};
}
{
goPackagePath = "github.com/josharian/native";
fetch = {
type = "git";
url = "https://github.com/josharian/native";
rev = "a938fb150d47536d63d6bb2f0c4433091cb8c223";
sha256 = "sha256-KYeAFKKzRt+e7Zy0sp4VW65HQL90hF/wjXP3R5dXaww=";
};
}
{
goPackagePath = "github.com/mdlayher/socket";
fetch = {
type = "git";
url = "https://github.com/mdlayher/socket";
rev = "v0.2.3";
sha256 = "sha256-EDaSQ621SJ2OK2WycMtybuJ2KpaH86JHknqsiduuCtQ=";
};
}
{
goPackagePath = "golang.org/x/net";
fetch = {
type = "git";
url = "https://github.com/golang/net";
rev = "83b083e8dc8b4507e702ce59208711115b23ec25";
sha256 = "sha256-50A1EeE7HxKbnLBy1vdxtrbH+7d6/mnZA0cOwHJr5XA=";
};
}
{
goPackagePath = "golang.org/x/sync";
fetch = {
type = "git";
url = "https://github.com/golang/sync";
rev = "7fc1605a5dde7535a0fc1770ca44238629ff29ac";
sha256 = "sha256-5EOxO8FRdaLW9v/DhwBmWiT2G34A2ofxSCaC7ovvpb0=";
};
}
{
goPackagePath = "github.com/adrg/xdg";
fetch = {
type = "git";
url = "https://github.com/adrg/xdg";
rev = "v0.4.0";
sha256 = "sha256-zGjkdUQmrVqD6rMO9oDY+TeJCpuqnHyvkPCaXDlac/U=";
};
}
]

View File

@ -1,25 +1,22 @@
{ stdenv
, lib
, buildGoModule
, fetchFromGitHub
, buildGoPackage
, go-lib
, glib
}:
buildGoPackage rec {
pname = "deepin-desktop-schemas";
version = "5.10.11";
goPackagePath = "github.com/linuxdeepin/deepin-desktop-schemas";
buildGoModule rec {
pname = "deepin-desktop-schemas";
version = "6.0.5";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-MboNj0zC3azavDUsmeNNafCcUa0GeoySl610+WOtNww=";
hash = "sha256-lvAY0CJ+EohMK16fwIkB7Jq7gTpMhDimPYs9b/IklA4=";
};
nativeBuildInputs = [ glib ];
buildInputs = [ go-lib ];
vendorHash = "sha256-q6ugetchJLv2JjZ9+nevUI0ptizh2V+6SByoY/eFJJQ=";
postPatch = ''
# Relocate files path for backgrounds and wallpapers
@ -32,21 +29,23 @@ buildGoPackage rec {
buildPhase = ''
runHook preBuild
addToSearchPath GOPATH "${go-lib}/share/gocode"
make ARCH=${stdenv.hostPlatform.linuxArch} -C go/src/${goPackagePath}
make ARCH=${stdenv.hostPlatform.linuxArch}
runHook postBuild
'';
nativeCheckInputs = [ glib ];
checkPhase = ''
runHook preCheck
make test
runHook postCheck
'';
installPhase = ''
runHook preInstall
make install DESTDIR="$out" PREFIX="/" -C go/src/${goPackagePath}
make install DESTDIR="$out" PREFIX="/"
runHook postInstall
'';
preFixup = ''
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
meta = with lib; {
description = "GSettings deepin desktop-wide schemas";
homepage = "https://github.com/linuxdeepin/deepin-desktop-schemas";

View File

@ -1,12 +1,8 @@
{ stdenv
, lib
{ lib
, fetchFromGitHub
, buildGoPackage
, buildGoModule
, pkg-config
, deepin-gettext-tools
, go-dbus-factory
, go-gir-generator
, go-lib
, gtk3
, glib
, libxcrypt
@ -16,20 +12,18 @@
, linux-pam
}:
buildGoPackage rec {
buildGoModule rec {
pname = "deepin-pw-check";
version = "5.1.18";
goPackagePath = "github.com/linuxdeepin/deepin-pw-check";
version = "6.0.2";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-v1Z4ArkrejjOCO1vD+BhfEl9pTfuvKgLM6Ont0IUCQk=";
hash = "sha256-kBrkcB0IWGUV4ZrkFzwdPglRgDcnVvYDFhTXS20pKOk=";
};
goDeps = ./deps.nix;
vendorHash = "sha256-L0vUEkUN70Hrx5roIvTfaZBHbbq7mf3WpQJeFAMU5HY=";
nativeBuildInputs = [
pkg-config
@ -38,9 +32,6 @@ buildGoPackage rec {
];
buildInputs = [
go-dbus-factory
go-gir-generator
go-lib
glib
libxcrypt
gtk3
@ -51,24 +42,19 @@ buildGoPackage rec {
postPatch = ''
sed -i 's|iniparser/||' */*.c
substituteInPlace misc/pkgconfig/libdeepin_pw_check.pc \
substituteInPlace misc/{pkgconfig/libdeepin_pw_check.pc,system-services/org.deepin.dde.PasswdConf1.service} \
--replace "/usr" "$out"
substituteInPlace misc/system-services/com.deepin.daemon.PasswdConf.service \
--replace "/usr/lib/deepin-pw-check/deepin-pw-check" "$out/lib/deepin-pw-check/deepin-pw-check"
'';
buildPhase = ''
runHook preBuild
addToSearchPath GOPATH "${go-dbus-factory}/share/gocode"
addToSearchPath GOPATH "${go-gir-generator}/share/gocode"
addToSearchPath GOPATH "${go-lib}/share/gocode"
make -C go/src/${goPackagePath}
make
runHook postBuild
'';
installPhase = ''
runHook preInstall
make install PREFIX="$out" PKG_FILE_DIR=$out/lib/pkg-config PAM_MODULE_DIR=$out/etc/pam.d -C go/src/${goPackagePath}
make install PREFIX="$out" PKG_FILE_DIR=$out/lib/pkgconfig PAM_MODULE_DIR=$out/etc/pam.d
# https://github.com/linuxdeepin/deepin-pw-check/blob/d5597482678a489077a506a87f06d2b6c4e7e4ed/debian/rules#L21
ln -s $out/lib/libdeepin_pw_check.so $out/lib/libdeepin_pw_check.so.1
runHook postInstall

View File

@ -1,75 +0,0 @@
[
{
goPackagePath = "github.com/fsnotify/fsnotify";
fetch = {
type = "git";
url = "https://github.com/fsnotify/fsnotify";
rev = "v1.5.1";
sha256 = "sha256-B8kZ8yiWgallT7R2j1kSRJcJkSGFVf9ise+TpXa+7XY=";
};
}
{
goPackagePath = "github.com/godbus/dbus";
fetch = {
type = "git";
url = "https://github.com/godbus/dbus";
rev = "v5.1.0";
sha256 = "sha256-JSPtmkGEStBEVrKGszeLCb7P38SzQKgMiDC3eDppXs0=";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.7.1";
sha256 = "sha256-disUVIHiIDSj/go3APtJH8awSl8QwKRRFLKI7LRnl0w=";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://github.com/golang/sys";
rev = "289d7a0edf712062d9f1484b07bdf2383f48802f";
sha256 = "sha256-AzS/J3OocI7mA0xsIfQzyskNKVija7F2yvuts+EFJBs=";
};
}
{
goPackagePath = "gopkg.in/yaml.v3";
fetch = {
type = "git";
url = "https://github.com/go-yaml/yaml";
rev = "496545a6307b2a7d7a710fd516e5e16e8ab62dbc";
sha256 = "sha256-j8yDji+vqsitpRZirpb4w/Em8nstgf28wpwkcrOlxBk=";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.1";
sha256 = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.3.0";
sha256 = "sha256-T753/EiD5Cpk6H2JFhd+s1gFvpNptG2XlEHxZF6dQaw=";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "5d4384ee4fb2527b0a1256a821ebfc92f91efefc";
sha256 = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=";
};
}
]

View File

@ -1,69 +1,8 @@
From 47a700c64329f76ab91ac01d83a93f43bebe638b Mon Sep 17 00:00:00 2001
From: rewine <lhongxu@outlook.com>
Date: Sun, 9 Apr 2023 17:14:00 +0800
Subject: [PATCH] avoid use hardcode path
---
display/wayland.go | 4 ++--
main.go | 10 +++++-----
misc/auto_launch/chinese.json | 4 ++--
session.go | 15 +++++++++------
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/display/wayland.go b/display/wayland.go
index b980425..e44342a 100644
--- a/display/wayland.go
+++ b/display/wayland.go
@@ -556,7 +556,7 @@ func (mm *kMonitorManager) applyByWLOutput(monitorMap map[uint32]*Monitor) error
if len(args_enable) > 0 {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
- cmdline := exec.CommandContext(ctx, "/usr/bin/dde_wloutput", "set")
+ cmdline := exec.CommandContext(ctx, "dde_wloutput", "set")
cmdline.Args = append(cmdline.Args, args_enable...)
logger.Info("cmd line args_enable:", cmdline.Args)
@@ -572,7 +572,7 @@ func (mm *kMonitorManager) applyByWLOutput(monitorMap map[uint32]*Monitor) error
}
if len(args_disable) > 0 {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
- cmdline := exec.CommandContext(ctx, "/usr/bin/dde_wloutput", "set")
+ cmdline := exec.CommandContext(ctx, "dde_wloutput", "set")
cmdline.Args = append(cmdline.Args, args_disable...)
logger.Info("cmd line args_disable:", cmdline.Args)
diff --git a/main.go b/main.go
index 77b4e78..30aa3fd 100644
--- a/main.go
+++ b/main.go
@@ -96,17 +96,17 @@ func shouldUseDDEKWin() bool {
}
end:
- _, err = os.Stat("/usr/bin/kwin_no_scale")
+ _, err = exec.LookPath("kwin_no_scale")
return err == nil
}
const (
- cmdKWin = "/usr/bin/kwin_no_scale"
+ cmdKWin = "kwin_no_scale"
cmdDdeSessionDaemon = "/usr/lib/deepin-daemon/dde-session-daemon"
- cmdDdeDock = "/usr/bin/dde-dock"
- cmdDdeDesktop = "/usr/bin/dde-desktop"
+ cmdDdeDock = "dde-dock"
+ cmdDdeDesktop = "dde-desktop"
cmdLoginReminderHelper = "/usr/libexec/deepin/login-reminder-helper"
- cmdDdeHintsDialog = "/usr/bin/dde-hints-dialog"
+ cmdDdeHintsDialog = "dde-hints-dialog"
loginReminderTimeout = 5 * time.Second
loginReminderTimeFormat = "2006-01-02 15:04:05"
diff --git a/misc/auto_launch/chinese.json b/misc/auto_launch/chinese.json
index 079a521..1856ab1 100644
index 14b8bff..2b2c412 100644
--- a/misc/auto_launch/chinese.json
+++ b/misc/auto_launch/chinese.json
@@ -13,7 +13,7 @@
@@ -3,7 +3,7 @@
"Priority": 9,
"Group": [
{
@ -72,7 +11,7 @@ index 079a521..1856ab1 100644
"Wait": false,
"Args": [
"-d"
@@ -39,7 +39,7 @@
@@ -25,7 +25,7 @@
"Priority": 7,
"Group": [
{
@ -82,39 +21,27 @@ index 079a521..1856ab1 100644
"Args": [
"-d"
diff --git a/session.go b/session.go
index 26f89ef..f412ca4 100644
index da76626..bf9a2c4 100644
--- a/session.go
+++ b/session.go
@@ -18,6 +18,7 @@ import (
@@ -14,6 +14,7 @@ import (
"sync"
"syscall"
"time"
+ "strings"
+ "github.com/adrg/xdg"
"github.com/godbus/dbus"
"github.com/linuxdeepin/dde-api/soundutils"
daemon "github.com/linuxdeepin/go-dbus-factory/com.deepin.daemon.daemon"
@@ -53,8 +54,10 @@ const (
xsKeyQtFontName = "Qt/FontName"
xsKeyQtMonoFontName = "Qt/MonoFontName"
+)
- ddeLockDesktopFile = "/usr/share/applications/dde-lock.desktop"
+var (
+ ddeLockDesktopFile, _ = xdg.SearchDataFile("applications/dde-lock.desktop");
)
type SessionManager struct {
@@ -90,7 +93,7 @@ type SessionManager struct {
"github.com/adrg/xdg"
"github.com/godbus/dbus/v5"
@@ -85,7 +86,7 @@ type SessionManager struct {
}
const (
- cmdShutdown = "/usr/bin/dde-shutdown"
+ cmdShutdown = "dde-shutdown"
lockFrontDest = "com.deepin.dde.lockFront"
lockFrontDest = "org.deepin.dde.LockFront1"
lockFrontIfc = lockFrontDest
lockFrontObjPath = "/com/deepin/dde/lockFront"
@@ -471,7 +474,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
lockFrontObjPath = "/org/deepin/dde/LockFront1"
@@ -458,7 +459,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
return dbusutil.ToError(err)
}
@ -123,7 +50,7 @@ index 26f89ef..f412ca4 100644
m.setLocked(value)
return nil
}
@@ -491,7 +494,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
@@ -478,7 +479,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error {
return dbusutil.ToError(fmt.Errorf("desktop file %q is invalid", desktopFile))
}
exe = info.GetExecutable()
@ -132,22 +59,3 @@ index 26f89ef..f412ca4 100644
return dbusutil.ToError(fmt.Errorf("exe %q of desktop file %q is invalid", exe, desktopFile))
}
@@ -798,7 +801,7 @@ func setupEnvironments2() {
// man gnome-keyring-daemon:
// The daemon will print out various environment variables which should be set
// in the user's environment, in order to interact with the daemon.
- gnomeKeyringOutput, err := exec.Command("/usr/bin/gnome-keyring-daemon", "--start",
+ gnomeKeyringOutput, err := exec.Command("gnome-keyring-daemon", "--start",
"--components=secrets,pkcs11,ssh").Output()
if err == nil {
lines := bytes.Split(gnomeKeyringOutput, []byte{'\n'})
@@ -1389,4 +1392,4 @@ func initXEventMonitor() {
setDPMSMode(true)
}
})
-}
\ No newline at end of file
+}
--
2.39.2

View File

@ -1,99 +1,83 @@
{ stdenv
, lib
, buildGoModule
, fetchFromGitHub
, buildGoPackage
, pkg-config
, go-dbus-factory
, go-gir-generator
, go-lib
, gettext
, dde-api
, pkg-config
, jq
, wrapGAppsHook
, glib
, libgnome-keyring
, gtk3
, alsa-lib
, libpulseaudio
, pulseaudio
, libgudev
, libsecret
, jq
, wrapGAppsHook
, runtimeShell
, dde-polkit-agent
, dbus
}:
buildGoPackage rec {
buildGoModule rec {
pname = "startdde";
version = "5.10.1";
goPackagePath = "github.com/linuxdeepin/startdde";
version = "6.0.10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-dbTcYS7dEvT0eP45jKE8WiG9Pm4LU6jvR8hjMQv/yxU=";
hash = "sha256-B2B8QlA1Ps/ybVzionngtwDwTLd7H02RKJwcXymGlJM=";
};
patches = [
./0001-avoid-use-hardcode-path.patch
];
vendorHash = "sha256-5BEOazAygYL1N+CaGAbUwdpHZ1EiHr6yNW27/bXNdZg=";
postPatch = ''
substituteInPlace display/manager.go session.go \
--replace "/bin/bash" "${runtimeShell}"
substituteInPlace display/manager.go main.go utils.go session.go \
substituteInPlace misc/systemd_task/dde-display-task-refresh-brightness.service \
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send"
substituteInPlace display/manager.go utils.go session.go \
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
substituteInPlace misc/xsessions/deepin.desktop.in --subst-var-by PREFIX $out
substituteInPlace watchdog/dde_polkit_agent.go misc/auto_launch/{default.json,chinese.json} \
--replace "/usr/lib/polkit-1-dde/dde-polkit-agent" "${dde-polkit-agent}/lib/polkit-1-dde/dde-polkit-agent"
substituteInPlace startmanager.go launch_group.go memchecker/config.go \
--replace "/usr/share/startdde" "$out/share/startdde"
substituteInPlace misc/lightdm.conf --replace "/usr" "$out"
'';
goDeps = ./deps.nix;
nativeBuildInputs = [
gettext
pkg-config
jq
wrapGAppsHook
glib
];
buildInputs = [
go-dbus-factory
go-gir-generator
go-lib
dde-api
libgnome-keyring
gtk3
alsa-lib
libpulseaudio
pulseaudio
libgudev
libsecret
];
buildPhase = ''
runHook preBuild
addToSearchPath GOPATH "${go-dbus-factory}/share/gocode"
addToSearchPath GOPATH "${go-gir-generator}/share/gocode"
addToSearchPath GOPATH "${go-lib}/share/gocode"
addToSearchPath GOPATH "${dde-api}/share/gocode"
make -C go/src/${goPackagePath}
make GO_BUILD_FLAGS="$GOFLAGS"
runHook postBuild
'';
installPhase = ''
make install DESTDIR="$out" PREFIX="/" -C go/src/${goPackagePath}
runHook preInstall
make install DESTDIR="$out" PREFIX="/"
runHook postInstall
'';
passthru.providedSessions = [ "deepin" ];
meta = with lib; {
description = "Starter of deepin desktop environment";
longDescription = ''
Startdde is used for launching DDE components and invoking user's
custom applications which compliant with xdg autostart specification
'';
homepage = "https://github.com/linuxdeepin/startdde";
license = licenses.gpl3Plus;
platforms = platforms.linux;

View File

@ -1,236 +0,0 @@
[
{
goPackagePath = "github.com/cryptix/wav";
fetch = {
type = "git";
url = "https://github.com/cryptix/wav";
rev = "8bdace674401f0bd3b63c65479b6a6ff1f9d5e44";
sha256 = "18nyqv0ic35fs9fny8sj84c00vbxs8mnric6vr6yl42624fh5id6";
};
}
{
goPackagePath = "github.com/davecgh/go-spew";
fetch = {
type = "git";
url = "https://github.com/davecgh/go-spew";
rev = "v1.1.1";
sha256 = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=";
};
}
{
goPackagePath = "github.com/linuxdeepin/go-x11-client";
fetch = {
type = "git";
url = "https://github.com/linuxdeepin/go-x11-client";
rev = "0.6.9";
sha256 = "sha256-xXNaXpFFHJN1fCFLoVrQFCXQ4ya+Kga55QWcJL/InkA=";
};
}
{
goPackagePath = "golang.org/x/xerrors";
fetch = {
type = "git";
url = "https://github.com/golang/xerrors";
rev = "2f41105eb62f341cfe208d06de4ee3bdd3a083da";
sha256 = "sha256-yZNeG+jcarcw/aOFhrhxWWE20r0P+/VJF4i/0JQfv1c=";
};
}
{
goPackagePath = "github.com/fsnotify/fsnotify";
fetch = {
type = "git";
url = "https://github.com/fsnotify/fsnotify";
rev = "v1.5.1";
sha256 = "sha256-B8kZ8yiWgallT7R2j1kSRJcJkSGFVf9ise+TpXa+7XY=";
};
}
{
goPackagePath = "github.com/godbus/dbus";
fetch = {
type = "git";
url = "https://github.com/godbus/dbus";
rev = "v5.1.0";
sha256 = "sha256-JSPtmkGEStBEVrKGszeLCb7P38SzQKgMiDC3eDppXs0=";
};
}
{
goPackagePath = "github.com/stretchr/testify";
fetch = {
type = "git";
url = "https://github.com/stretchr/testify";
rev = "v1.7.1";
sha256 = "sha256-disUVIHiIDSj/go3APtJH8awSl8QwKRRFLKI7LRnl0w=";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://github.com/golang/sys";
rev = "289d7a0edf712062d9f1484b07bdf2383f48802f";
sha256 = "sha256-AzS/J3OocI7mA0xsIfQzyskNKVija7F2yvuts+EFJBs=";
};
}
{
goPackagePath = "gopkg.in/yaml.v3";
fetch = {
type = "git";
url = "https://github.com/go-yaml/yaml";
rev = "496545a6307b2a7d7a710fd516e5e16e8ab62dbc";
sha256 = "sha256-j8yDji+vqsitpRZirpb4w/Em8nstgf28wpwkcrOlxBk=";
};
}
{
goPackagePath = "github.com/stretchr/objx";
fetch = {
type = "git";
url = "https://github.com/stretchr/objx";
rev = "v0.3.0";
sha256 = "sha256-T753/EiD5Cpk6H2JFhd+s1gFvpNptG2XlEHxZF6dQaw=";
};
}
{
goPackagePath = "github.com/pmezard/go-difflib";
fetch = {
type = "git";
url = "https://github.com/pmezard/go-difflib";
rev = "5d4384ee4fb2527b0a1256a821ebfc92f91efefc";
sha256 = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=";
};
}
{
goPackagePath = "github.com/axgle/mahonia";
fetch = {
type = "git";
url = "https://github.com/axgle/mahonia";
rev = "3358181d7394e26beccfae0ffde05193ef3be33a";
sha256 = "0b8wsrxmv8a0cqbnsg55lpf29pxy2zw8azvgh3ck664lqpcfybhq";
};
}
{
goPackagePath = "golang.org/x/text";
fetch = {
type = "git";
url = "https://github.com/golang/text";
rev = "v0.3.7";
sha256 = "sha256-XpIbgE6MxWwDQQcPXr2NIsE2cev2+CIabi566TYGfHY=";
};
}
{
goPackagePath = "golang.org/x/image";
fetch = {
type = "git";
url = "https://github.com/golang/image";
rev = "70e8d0d3baa9a699c3865c753cbfa8ae65bd86ce";
sha256 = "sha256-oMbDIke/qQ6cp7JLNsMusf7EIUfuj0WavFVfI0lxTDs=";
};
}
{
goPackagePath = "github.com/nfnt/resize";
fetch = {
type = "git";
url = "https://github.com/nfnt/resize";
rev = "83c6a9932646f83e3267f353373d47347b6036b2";
sha256 = "005cpiwq28krbjf0zjwpfh63rp4s4is58700idn24fs3g7wdbwya";
};
}
{
goPackagePath = "github.com/Lofanmi/pinyin-golang";
fetch = {
type = "git";
url = "https://github.com/Lofanmi/pinyin-golang";
rev = "1db892057f20c56a3286cc1517e0642dacbff54c";
sha256 = "sha256-nhO6AYZ3vc7nwgmmfTlE6m33caY9gGZoKiSYvFLqHQc=";
};
}
{
goPackagePath = "github.com/mozillazg/go-pinyin";
fetch = {
type = "git";
url = "https://github.com/mozillazg/go-pinyin";
rev = "8930bc1fcb5693689dc35d98ad2a4153662e34b1";
sha256 = "sha256-kuMNiWpPeqsIsFgYIOsffxUfwcLPaMZWdZRBJAMDVvA=";
};
}
{
goPackagePath = "github.com/kelvins/sunrisesunset";
fetch = {
type = "git";
url = "https://github.com/kelvins/sunrisesunset";
rev = "39fa1bd816d52927b4cfcab0a1535b17eafe0a3d";
sha256 = "sha256-awklKAW1YM3sWM21irbyu2sUMIo3kCOj12lzyVzDefw=";
};
}
{
goPackagePath = "github.com/rickb777/date";
fetch = {
type = "git";
url = "https://github.com/rickb777/date";
rev = "v1.18";
sha256 = "sha256-8r8eFOF5dKtowE3dnjpSMIXJ/yX2IjiR7nZ/EApUZbA=";
};
}
{
goPackagePath = "github.com/rickb777/plural";
fetch = {
type = "git";
url = "https://github.com/rickb777/plural";
rev = "v1.4.1";
sha256 = "sha256-nhN+ApdfUie45L+M2OZAPtSoiIZ1pZ2UpDX/DePS6Yw=";
};
}
{
goPackagePath = "github.com/gosexy/gettext";
fetch = {
type = "git";
url = "https://github.com/gosexy/gettext";
rev = "v0.9";
sha256 = "0asphx8nd7zmp88wk6aakk5292np7yw73akvfdvlvs9q5r5ahkgi";
};
}
{
goPackagePath = "github.com/msteinert/pam";
fetch = {
type = "git";
url = "https://github.com/msteinert/pam";
rev = "v1.0.0";
sha256 = "sha256-Ji13ckPyZUBAovhK2hRHgf2LB1ieglX/XrIJBxVcsXc=";
};
}
{
goPackagePath = "github.com/youpy/go-wav";
fetch = {
type = "git";
url = "https://github.com/youpy/go-wav";
rev = "v0.3.2";
sha256 = "sha256-jNqXW3F3fcgjT47+d2MVXauWkA7+1KfYVu3ZZpRCTkM=";
};
}
{
goPackagePath = "github.com/zaf/g711";
fetch = {
type = "git";
url = "https://github.com/zaf/g711";
rev = "v1.2";
sha256 = "sha256-G+0cgGw/fcOUFVn32AeqUE0YjyOS82Z5MTcn6IANhCY=";
};
}
{
goPackagePath = "github.com/youpy/go-riff";
fetch = {
type = "git";
url = "https://github.com/youpy/go-riff";
rev = "v0.1.0";
sha256 = "sha256-d/3rkxDeRTPveZblArKc61gB4LJVV08n7g0THieuhx8=";
};
}
{
goPackagePath = "github.com/adrg/xdg";
fetch = {
type = "git";
url = "https://github.com/adrg/xdg";
rev = "v0.4.0";
sha256 = "sha256-zGjkdUQmrVqD6rMO9oDY+TeJCpuqnHyvkPCaXDlac/U=";
};
}
]

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "dde-qt-dbus-factory";
version = "5.5.22";
version = "6.0.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-jqk04S+i3py3rVJcHmkPKHsU+eNEN1yoUBBlfXBbcwM=";
hash = "sha256-9r5thJJjEZAuDT0N/m1gcr0Faa8WpZOtGKDYuZEvJis=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,60 @@
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, cmake
, qttools
, wrapQtAppsHook
, libisoburn
, ncnn
, opencv
, vulkan-headers
}:
stdenv.mkDerivation rec {
pname = "deepin-ocr-plugin-manager";
version = "unstable-2023-07-10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = "9b5c9e57c83b5adde383ed404b73f9dcbf5e6a48";
hash = "sha256-U5lxAKTaQvvlqbqRezPIcBGg+DpF1hZ204Y1+8dt14U=";
};
# don't use vendored opencv
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace "opencv_mobile" "opencv4"
substituteInPlace src/paddleocr-ncnn/paddleocr.cpp \
--replace "/usr" "$out"
'';
nativeBuildInputs = [
cmake
qttools
pkg-config
wrapQtAppsHook
];
buildInputs = [
ncnn
opencv
vulkan-headers
];
strictDeps = true;
cmakeFlags = [
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
meta = with lib; {
description = "Plugin manager of optical character recognition for DDE";
homepage = "https://github.com/linuxdeepin/deepin-ocr-plugin-manager";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "deepin-pdfium";
version = "1.0.1";
version = "1.0.2";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-gUIQ+fZ7VaYaIj1hbzER10ceoJZbvhJlnDTFIShMrKw=";
hash = "sha256-ymJSTAccwRumXrh4VjwarKYgaqadMBrtXM1rjWNfe8o=";
};
nativeBuildInputs = [

View File

@ -1,39 +1,25 @@
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, cmake
, qtbase
, qttools
, wrapQtAppsHook
, glib
}:
stdenv.mkDerivation rec {
pname = "dtkcommon";
version = "5.6.9";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-FHXwgFTevCGTNUPlb/oeltE2//Sjwz7YVvko7QPOsRo=";
hash = "sha256-mquBuF+Gzq5txxCczeS+gI8LshdKnK5WnpOCytNki+w=";
};
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
];
buildInputs = [ qtbase ];
qmakeFlags = [ "PREFIX=${placeholder "out"}" ];
preFixup = ''
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
dontWrapQtApps = true;
meta = with lib; {
description = "A public project for building DTK Library";

View File

@ -10,6 +10,7 @@
, gsettings-qt
, lshw
, libuchardet
, spdlog
, dtkcommon
, systemd
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
@ -17,15 +18,20 @@
stdenv.mkDerivation rec {
pname = "dtkcore";
version = "5.6.10";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-ge8DiJMSaZo7GeQEgnDbi5SLsLxtOQ/P5/9aBgaG7Ds=";
hash = "sha256-/MGSvT8tPn+KqqlM6FY2iFsArmAkYMW5Q3Sl4g4zvH0=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
];
postPatch = ''
substituteInPlace src/dsysinfo.cpp \
--replace "/usr/share/deepin/distribution.info" "/etc/distribution.info" \
@ -39,25 +45,27 @@ stdenv.mkDerivation rec {
wrapQtAppsHook
];
dontWrapQtApps = true;
buildInputs = [
qtbase
gsettings-qt
lshw
libuchardet
spdlog
]
++ lib.optional withSystemd systemd;
propagatedBuildInputs = [ dtkcommon ];
cmakeFlags = [
"-DDVERSION=${version}"
"-DBUILD_EXAMPLES=OFF"
"-DDTK_VERSION=${version}"
"-DBUILD_DOCS=ON"
"-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
"-DBUILD_EXAMPLES=OFF"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
"-DDSG_PREFIX_PATH='/run/current-system/sw'"
"-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec"
"-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata"
"-DBUILD_WITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}"
];
@ -68,6 +76,8 @@ stdenv.mkDerivation rec {
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = with lib; {
description = "Deepin tool kit core library";
homepage = "https://github.com/linuxdeepin/dtkcore";

View File

@ -0,0 +1,14 @@
diff --git a/misc/dtkcore.pc.in b/misc/dtkcore.pc.in
index 83eecb7..da24ce8 100644
--- a/misc/dtkcore.pc.in
+++ b/misc/dtkcore.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIBRARY_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIBRARY_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: dtk@DTK_VERSION_MAJOR@core
Description: Deepin Tool Kit dtkcore header files

View File

@ -0,0 +1,17 @@
diff --git a/misc/qt_lib_dtkcore.pri.in b/misc/qt_lib_dtkcore.pri.in
index a331f52..ce01dc0 100644
--- a/misc/qt_lib_dtkcore.pri.in
+++ b/misc/qt_lib_dtkcore.pri.in
@@ -4,9 +4,9 @@ QT.dtkcore.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkcore.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkcore.name = dtkcore
QT.dtkcore.module = dtk@DTK_VERSION_MAJOR@core
-QT.dtkcore.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
-QT.dtkcore.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
-QT.dtkcore.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkcore.tools = @TOOL_INSTALL_DIR@
+QT.dtkcore.libs = @LIBRARY_INSTALL_DIR@
+QT.dtkcore.includes = @INCLUDE_INSTALL_DIR@
QT.dtkcore.frameworks =
QT.dtkcore.depends = core dbus xml
QT.dtkcore.module_config = v2 ltcg

View File

@ -0,0 +1,72 @@
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, doxygen
, wrapQtAppsHook
, qtbase
, dtkgui
, qtdeclarative
, qtquickcontrols2
, qtgraphicaleffects
}:
stdenv.mkDerivation rec {
pname = "dtkdeclarative";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-P0F6GidGp+CkNplKnLiaYVtcxs6N66gGIx6UcplEt08=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
];
nativeBuildInputs = [
cmake
pkg-config
doxygen
qttools
wrapQtAppsHook
];
propagatedBuildInputs = [
dtkgui
qtdeclarative
qtquickcontrols2
qtgraphicaleffects
];
cmakeFlags = [
"-DDTK_VERSION=${version}"
"-DBUILD_DOCS=ON"
"-DBUILD_EXAMPLES=ON"
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
"-DQML_INSTALL_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
];
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}
export QML2_IMPORT_PATH=${qtdeclarative.bin}/${qtbase.qtQmlPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = with lib; {
description = "A widget development toolkit based on QtQuick/QtQml";
homepage = "https://github.com/linuxdeepin/dtkdeclarative";
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}

View File

@ -0,0 +1,14 @@
diff --git a/misc/dtkdeclarative.pc.in b/misc/dtkdeclarative.pc.in
index dc3827f..fd0949e 100644
--- a/misc/dtkdeclarative.pc.in
+++ b/misc/dtkdeclarative.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIB_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: DtkDeclarative
Description: Deepin Tool Kit DtkDeclarative header files

View File

@ -0,0 +1,15 @@
diff --git a/misc/qt_lib_dtkdeclarative.pri.in b/misc/qt_lib_dtkdeclarative.pri.in
index 8797802..44e32a3 100644
--- a/misc/qt_lib_dtkdeclarative.pri.in
+++ b/misc/qt_lib_dtkdeclarative.pri.in
@@ -4,8 +4,8 @@ QT.dtkdeclarative.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkdeclarative.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkdeclarative.name = dtkdeclarative
QT.dtkdeclarative.module = dtk@DTK_VERSION_MAJOR@declarative
-QT.dtkdeclarative.libs = @CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
-QT.dtkdeclarative.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkdeclarative.libs = @LIB_INSTALL_DIR@
+QT.dtkdeclarative.includes = @INCLUDE_INSTALL_DIR@
QT.dtkdeclarative.frameworks =
QT.dtkdeclarative.depends = core dbus xml gui dtkcore dtkgui quick quick_private
QT.dtkdeclarative.module_config = v2 ltcg

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, pkg-config
, cmake
, qttools
@ -17,15 +18,26 @@
stdenv.mkDerivation rec {
pname = "dtkgui";
version = "5.6.10";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-4NHt/hLtt99LhWvBX9e5ueB5G86SXx553G6fyHZBXcE=";
hash = "sha256-ssCVMFCE1vhucYMxXkEZV5YlFxT1JdYGqrzILhWX1XI=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
(fetchpatch {
name = "fix_svg_with_filter_attribute_rendering_exception.patch";
url = "https://github.com/linuxdeepin/dtkgui/commit/f2c9327eb4989ab8ea96af7560c67d1cada794de.patch";
hash = "sha256-lfg09tgS4vPuYachRbHdaMYKWdZZ0lP0Hxakkr9JKGs=";
})
];
nativeBuildInputs = [
cmake
qttools
@ -48,12 +60,11 @@ stdenv.mkDerivation rec {
];
cmakeFlags = [
"-DDVERSION=${version}"
"-DDTK_VERSION=${version}"
"-DBUILD_DOCS=ON"
"-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
"-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
"-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec"
];
preConfigure = ''
@ -62,6 +73,8 @@ stdenv.mkDerivation rec {
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = with lib; {
description = "Deepin Toolkit, gui module for DDE look and feel";
homepage = "https://github.com/linuxdeepin/dtkgui";

View File

@ -0,0 +1,16 @@
diff --git a/misc/dtkgui.pc.in b/misc/dtkgui.pc.in
index 89fdbbf..ad817c4 100644
--- a/misc/dtkgui.pc.in
+++ b/misc/dtkgui.pc.in
@@ -1,8 +1,8 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIBRARY_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
-tooldir=${prefix}/@PACKAGE_TOOL_INSTALL_DIR@
+libdir=@LIBRARY_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
+tooldir=@PACKAGE_TOOL_INSTALL_DIR@
Name: dtk@DTK_VERSION_MAJOR@gui
Description: Deepin Tool Kit dtkgui header files

View File

@ -0,0 +1,17 @@
diff --git a/misc/qt_lib_dtkgui.pri.in b/misc/qt_lib_dtkgui.pri.in
index 28308ee..9fb25e6 100644
--- a/misc/qt_lib_dtkgui.pri.in
+++ b/misc/qt_lib_dtkgui.pri.in
@@ -4,9 +4,9 @@ QT.dtkgui.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkgui.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkgui.name = dtkgui
QT.dtkgui.module = dtk@DTK_VERSION_MAJOR@gui
-QT.dtkgui.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
-QT.dtkgui.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
-QT.dtkgui.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkgui.tools = @TOOL_INSTALL_DIR@
+QT.dtkgui.libs = @LIBRARY_INSTALL_DIR@
+QT.dtkgui.includes = @INCLUDE_INSTALL_DIR@
QT.dtkgui.frameworks =
QT.dtkgui.depends = core gui dtkcore gui_private dbus network
QT.dtkgui.module_config = v2 internal_module ltcg

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, qttools
@ -19,15 +20,20 @@
stdenv.mkDerivation rec {
pname = "dtkwidget";
version = "5.6.10";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-PhVK/lUFrDW1bn9lUhLuKWLAVj7E7+/YC5USShrg3ds=";
hash = "sha256-oFmM0e7ht3lCL50pwS/v/BLFmT2jymQaUZ4SmLdxvMo=";
};
patches = [
./fix-pkgconfig-path.patch
./fix-pri-path.patch
];
postPatch = ''
substituteInPlace src/widgets/dapplication.cpp \
--replace "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \
@ -56,12 +62,11 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ dtkgui ];
cmakeFlags = [
"-DDVERSION=${version}"
"-DDTK_VERSION=${version}"
"-DBUILD_DOCS=ON"
"-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
"-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
"-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "dev"}/libexec"
];
preConfigure = ''
@ -70,6 +75,8 @@ stdenv.mkDerivation rec {
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
outputs = [ "out" "dev" "doc" ];
meta = with lib; {
description = "Deepin graphical user interface library";
homepage = "https://github.com/linuxdeepin/dtkwidget";

View File

@ -0,0 +1,14 @@
diff --git a/misc/DtkWidget.pc.in b/misc/DtkWidget.pc.in
index 3c610669..b6ed04ca 100644
--- a/misc/DtkWidget.pc.in
+++ b/misc/DtkWidget.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@LIBRARY_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIBRARY_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: dtk@DTK_VERSION_MAJOR@widget
Description: Deepin Tool Kit dtkwidget header files

View File

@ -0,0 +1,17 @@
diff --git a/misc/qt_lib_DtkWidget.pri.in b/misc/qt_lib_DtkWidget.pri.in
index 623878d3..561f5186 100644
--- a/misc/qt_lib_DtkWidget.pri.in
+++ b/misc/qt_lib_DtkWidget.pri.in
@@ -4,9 +4,9 @@ QT.dtkwidget.MINOR_VERSION = @PROJECT_VERSION_MINOR@
QT.dtkwidget.PATCH_VERSION = @PROJECT_VERSION_PATCH@
QT.dtkwidget.name = dtkwidget
QT.dtkwidget.module = dtk@DTK_VERSION_MAJOR@widget
-QT.dtkwidget.tools = @CMAKE_INSTALL_PREFIX@/@TOOL_INSTALL_DIR@
-QT.dtkwidget.libs = @CMAKE_INSTALL_PREFIX@/@LIBRARY_INSTALL_DIR@
-QT.dtkwidget.includes = @CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@
+QT.dtkwidget.tools = @TOOL_INSTALL_DIR@
+QT.dtkwidget.libs = @LIBRARY_INSTALL_DIR@
+QT.dtkwidget.includes = @INCLUDE_INSTALL_DIR@
QT.dtkwidget.frameworks =
QT.dtkwidget.depends = core gui dtkcore network concurrent dtkgui printsupport printsupport_private widgets widgets_private gui_private x11extras dbus
QT.dtkwidget.module_config = v2 internal_module ltcg

View File

@ -13,13 +13,13 @@
stdenv.mkDerivation rec {
pname = "dwayland";
version = "5.24.3-deepin.1.4";
version = "5.25.0";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-/aWS4uvhxi9azxJWjRE+Bw+veURFO+mC8l9yypseclU=";
hash = "sha256-XZvL3lauVW5D3r3kybpS3SiitvwEScqgYe2h9c1DuCs=";
};
nativeBuildInputs = [
@ -38,6 +38,11 @@ stdenv.mkDerivation rec {
dontWrapQtApps = true;
# cmake requires that the kf5 directory must not empty
postInstall = ''
mkdir $out/include/KF5
'';
meta = with lib; {
description = "Qt-style API to interact with the wayland-client and wayland-server";
homepage = "https://github.com/linuxdeepin/dwayland";

View File

@ -15,19 +15,16 @@
stdenv.mkDerivation rec {
pname = "image-editor";
version = "1.0.32";
version = "1.0.35";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-mA2pqWXa3i19jCymvUXnG6YUVezDSfRkHx2EoxAhnqU=";
hash = "sha256-Xr4tueipQbRHyKLStTWeUcVbX7Baiz0YooaaVk65Y+U=";
};
postPatch = ''
substituteInPlace libimageviewer/service/ffmpegvideothumbnailer.cpp \
--replace 'libPath("libffmpegthumbnailer.so")' 'QString("${ffmpegthumbnailer.out}/lib/libffmpegthumbnailer.so")'
substituteInPlace libimageviewer/CMakeLists.txt --replace '/usr' '$out'
substituteInPlace libimagevisualresult/CMakeLists.txt --replace '/usr' '$out'
'';

View File

@ -2,13 +2,11 @@
, lib
, fetchFromGitHub
, dtkwidget
, qmake
, cmake
, pkg-config
, qtbase
, qtsvg
, pkg-config
, wrapQtAppsHook
, qtx11extras
, qt5platform-plugins
, lxqt
, mtdev
, xorg
@ -17,37 +15,36 @@
stdenv.mkDerivation rec {
pname = "qt5integration";
version = "5.6.6";
version = "5.6.17";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-7b18ydyy/TIEGDkFAoium1LSx3Qs4I4pYpMfehOBZbY=";
hash = "sha256-8ag/cFkjp5u/0/71xKR6z6dXp2NGRIYNNbzzEmgsDmc=";
};
nativeBuildInputs = [
qmake
cmake
pkg-config
wrapQtAppsHook
];
buildInputs = [
dtkwidget
qtbase
qtsvg
qtx11extras
qt5platform-plugins
mtdev
lxqt.libqtxdg
xorg.xcbutilrenderutil
gtest
];
installPhase = ''
runHook preInstall
mkdir -p $out/${qtbase.qtPluginPrefix}
cp -r bin/plugins/* $out/${qtbase.qtPluginPrefix}/
runHook postInstall
'';
cmakeFlags = [
"-DPLUGIN_INSTALL_BASE_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
];
dontWrapQtApps = true;
meta = with lib; {
description = "Qt platform theme integration plugins for DDE";

View File

@ -1,54 +1,64 @@
{ stdenv
, lib
, fetchFromGitHub
, qmake
, fetchpatch
, cmake
, extra-cmake-modules
, pkg-config
, dtkcommon
, qtbase
, qtx11extras
, wrapQtAppsHook
, mtdev
, cairo
, xorg
, waylandSupport ? true
, wayland
, dwayland
, qtwayland
}:
stdenv.mkDerivation rec {
pname = "qt5platform-plugins";
version = "5.6.9";
version = "5.6.16";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-EG5M4rcMK62DX4ywm2IH0lGHC510BnMqcefMlF9pyr8=";
hash = "sha256-1/biT8wR44+sdOMhBW/8KMUSBDK/UxuEqsyjTZyjBT4=";
};
nativeBuildInputs = [
qmake
cmake
extra-cmake-modules
pkg-config
wrapQtAppsHook
];
buildInputs = [
dtkcommon
mtdev
cairo
qtbase
qtx11extras
xorg.libSM
]
++ lib.optionals waylandSupport [
wayland
dwayland
qtwayland
];
qmakeFlags = [
"INSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms"
"QT_XCB_PRIVATE_INCLUDE=${qtbase.src}/src/plugins/platforms/xcb"
]
++ lib.optionals (!waylandSupport) [ "CONFIG+=DISABLE_WAYLAND" ];
patches = [
(fetchpatch {
name = "use-ECM-to-help-dwayland-find-wayland.patch";
url = "https://github.com/linuxdeepin/qt5platform-plugins/commit/d7f6230716a0ff5ce34fc7d292ec0af5bbac30e4.patch";
hash = "sha256-RY2+QBR3OjUGBX4Y9oVvIRY90IH9rTOCg8dCddkB2WE=";
})
];
cmakeFlags = [
"-DINSTALL_PATH=${placeholder "out"}/${qtbase.qtPluginPrefix}/platforms"
"-DQT_XCB_PRIVATE_HEADERS=${qtbase.src}/src/plugins/platforms/xcb"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString waylandSupport "-I${wayland.dev}/include";
dontWrapQtApps = true;
meta = with lib; {
description = "Qt platform plugins for DDE";

View File

@ -13,13 +13,13 @@
stdenv.mkDerivation rec {
pname = "util-dfm";
version = "1.2.12";
version = "1.2.16";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-juZQCRtr0SWrPAz6PAAw2m/MWoTg7831BizziHsId00=";
hash = "sha256-o5ubfCpgAHJXqihGyapq7Dj9eQlw2q6VoER/e37tM6w=";
};
nativeBuildInputs = [