deepin.startdde: 6.0.10 -> 6.0.13

authored by rewine and committed by rewine b3c5ae34 69cfd69c

+5 -70
-61
pkgs/desktops/deepin/go-package/startdde/0001-avoid-use-hardcode-path.patch
··· 1 - diff --git a/misc/auto_launch/chinese.json b/misc/auto_launch/chinese.json 2 - index 14b8bff..2b2c412 100644 3 - --- a/misc/auto_launch/chinese.json 4 - +++ b/misc/auto_launch/chinese.json 5 - @@ -3,7 +3,7 @@ 6 - "Priority": 9, 7 - "Group": [ 8 - { 9 - - "Command": "/usr/bin/dde-file-manager", 10 - + "Command": "dde-file-manager", 11 - "Wait": false, 12 - "Args": [ 13 - "-d" 14 - @@ -25,7 +25,7 @@ 15 - "Priority": 7, 16 - "Group": [ 17 - { 18 - - "Command": "/usr/bin/dde-shutdown", 19 - + "Command": "dde-shutdown", 20 - "Wait": false, 21 - "Args": [ 22 - "-d" 23 - diff --git a/session.go b/session.go 24 - index da76626..bf9a2c4 100644 25 - --- a/session.go 26 - +++ b/session.go 27 - @@ -14,6 +14,7 @@ import ( 28 - "sync" 29 - "syscall" 30 - "time" 31 - + "strings" 32 - 33 - "github.com/adrg/xdg" 34 - "github.com/godbus/dbus/v5" 35 - @@ -85,7 +86,7 @@ type SessionManager struct { 36 - } 37 - 38 - const ( 39 - - cmdShutdown = "/usr/bin/dde-shutdown" 40 - + cmdShutdown = "dde-shutdown" 41 - lockFrontDest = "org.deepin.dde.LockFront1" 42 - lockFrontIfc = lockFrontDest 43 - lockFrontObjPath = "/org/deepin/dde/LockFront1" 44 - @@ -458,7 +459,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error { 45 - return dbusutil.ToError(err) 46 - } 47 - 48 - - if exe == "/usr/bin/dde-lock" { 49 - + if strings.Contains(exe, "dde-lock") { 50 - m.setLocked(value) 51 - return nil 52 - } 53 - @@ -478,7 +479,7 @@ func (m *SessionManager) SetLocked(sender dbus.Sender, value bool) *dbus.Error { 54 - return dbusutil.ToError(fmt.Errorf("desktop file %q is invalid", desktopFile)) 55 - } 56 - exe = info.GetExecutable() 57 - - if exe != "/usr/bin/dde-lock" { 58 - + if strings.Contains(exe, "dde-lock") { 59 - return dbusutil.ToError(fmt.Errorf("exe %q of desktop file %q is invalid", exe, desktopFile)) 60 - } 61 -
···
+5 -9
pkgs/desktops/deepin/go-package/startdde/default.nix
··· 19 20 buildGoModule rec { 21 pname = "startdde"; 22 - version = "6.0.10"; 23 24 src = fetchFromGitHub { 25 owner = "linuxdeepin"; 26 repo = pname; 27 rev = version; 28 - hash = "sha256-B2B8QlA1Ps/ybVzionngtwDwTLd7H02RKJwcXymGlJM="; 29 }; 30 31 - patches = [ 32 - ./0001-avoid-use-hardcode-path.patch 33 - ]; 34 - 35 - vendorHash = "sha256-5BEOazAygYL1N+CaGAbUwdpHZ1EiHr6yNW27/bXNdZg="; 36 37 postPatch = '' 38 - substituteInPlace display/manager.go session.go \ 39 --replace "/bin/bash" "${runtimeShell}" 40 41 substituteInPlace misc/systemd_task/dde-display-task-refresh-brightness.service \ 42 --replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" 43 44 - substituteInPlace display/manager.go utils.go session.go \ 45 --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon" 46 47 substituteInPlace misc/lightdm.conf --replace "/usr" "$out"
··· 19 20 buildGoModule rec { 21 pname = "startdde"; 22 + version = "6.0.13"; 23 24 src = fetchFromGitHub { 25 owner = "linuxdeepin"; 26 repo = pname; 27 rev = version; 28 + hash = "sha256-sftPQq4cSyCTuvVtvjT8YJDLQOpSbmnXEVzFwFFaU4U="; 29 }; 30 31 + vendorHash = "sha256-Y81p3yPQayXbvyUI7N6PvFDO3hSU3SL0AuUKxvZkZNE="; 32 33 postPatch = '' 34 + substituteInPlace display/manager.go \ 35 --replace "/bin/bash" "${runtimeShell}" 36 37 substituteInPlace misc/systemd_task/dde-display-task-refresh-brightness.service \ 38 --replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send" 39 40 + substituteInPlace display/manager.go \ 41 --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon" 42 43 substituteInPlace misc/lightdm.conf --replace "/usr" "$out"