mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
deepin.dde-daemon: fix can't set custom wallpapers
This commit is contained in:
parent
fd40cef8d7
commit
da98a5a6a5
@ -0,0 +1,22 @@
|
||||
diff --git a/bin/dde-system-daemon/wallpaper.go b/bin/dde-system-daemon/wallpaper.go
|
||||
index d4af13da..1ff36f84 100644
|
||||
--- a/bin/dde-system-daemon/wallpaper.go
|
||||
+++ b/bin/dde-system-daemon/wallpaper.go
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
const maxCount = 5
|
||||
const maxSize = 32 * 1024 * 1024
|
||||
-const wallPaperDir = "/usr/share/wallpapers/custom-wallpapers/"
|
||||
+const wallPaperDir = "/var/lib/dde-daemon/wallpapers/custom-wallpapers/"
|
||||
|
||||
func GetUserDir(username string) (string, error) {
|
||||
dir := filepath.Join(wallPaperDir, username)
|
||||
@@ -136,7 +136,7 @@ func (d *Daemon) SaveCustomWallPaper(sender dbus.Sender, username string, file s
|
||||
"-u",
|
||||
username,
|
||||
"--",
|
||||
- "head",
|
||||
+ "@coreutils@/bin/head",
|
||||
"-c",
|
||||
"0",
|
||||
file,
|
@ -32,6 +32,9 @@
|
||||
, xdotool
|
||||
, getconf
|
||||
, dbus
|
||||
, coreutils
|
||||
, util-linux
|
||||
, dde-session-ui
|
||||
}:
|
||||
|
||||
buildGoPackage rec {
|
||||
@ -55,6 +58,10 @@ buildGoPackage rec {
|
||||
src = ./0004-aviod-use-hardcode-path.patch;
|
||||
inherit dbus;
|
||||
})
|
||||
(substituteAll {
|
||||
src = ./0005-fix-custom-wallpapers-path.diff;
|
||||
inherit coreutils;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -70,7 +77,7 @@ buildGoPackage rec {
|
||||
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 bin/dde-system-daemon/wallpaper.go \
|
||||
substituteInPlace appearance/background/{background.go,custom_wallpapers.go} accounts/user.go \
|
||||
--replace "/usr/share/wallpapers" "/run/current-system/sw/share/wallpapers"
|
||||
|
||||
substituteInPlace appearance/manager.go timedate/zoneinfo/zone.go \
|
||||
@ -138,6 +145,12 @@ buildGoPackage rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH : "${lib.makeBinPath [ util-linux dde-session-ui ]}"
|
||||
)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for f in "$out"/lib/deepin-daemon/*; do
|
||||
echo "Wrapping $f"
|
||||
|
Loading…
Reference in New Issue
Block a user