2023-04-12 12:48:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, buildGoModule
|
2023-04-12 12:48:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gettext
|
2024-01-02 11:29:13 +00:00
|
|
|
, pkg-config
|
|
|
|
, jq
|
|
|
|
, wrapGAppsHook
|
|
|
|
, glib
|
2023-04-12 12:48:02 +00:00
|
|
|
, libgnome-keyring
|
|
|
|
, gtk3
|
|
|
|
, alsa-lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, pulseaudio
|
2023-04-12 12:48:02 +00:00
|
|
|
, libgudev
|
|
|
|
, libsecret
|
|
|
|
, runtimeShell
|
2024-01-02 11:29:13 +00:00
|
|
|
, dbus
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildGoModule rec {
|
2023-04-12 12:48:02 +00:00
|
|
|
pname = "startdde";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "6.0.13";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-sftPQq4cSyCTuvVtvjT8YJDLQOpSbmnXEVzFwFFaU4U=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-Y81p3yPQayXbvyUI7N6PvFDO3hSU3SL0AuUKxvZkZNE=";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
postPatch = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace display/manager.go \
|
2023-04-12 12:48:02 +00:00
|
|
|
--replace "/bin/bash" "${runtimeShell}"
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
substituteInPlace misc/systemd_task/dde-display-task-refresh-brightness.service \
|
|
|
|
--replace "/usr/bin/dbus-send" "${dbus}/bin/dbus-send"
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
substituteInPlace display/manager.go \
|
2023-04-12 12:48:02 +00:00
|
|
|
--replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon"
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
substituteInPlace misc/lightdm.conf --replace "/usr" "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
pkg-config
|
|
|
|
jq
|
|
|
|
wrapGAppsHook
|
2024-01-02 11:29:13 +00:00
|
|
|
glib
|
2023-04-12 12:48:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libgnome-keyring
|
|
|
|
gtk3
|
|
|
|
alsa-lib
|
2024-01-02 11:29:13 +00:00
|
|
|
pulseaudio
|
2023-04-12 12:48:02 +00:00
|
|
|
libgudev
|
|
|
|
libsecret
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2024-01-02 11:29:13 +00:00
|
|
|
make GO_BUILD_FLAGS="$GOFLAGS"
|
2023-04-12 12:48:02 +00:00
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
runHook preInstall
|
|
|
|
make install DESTDIR="$out" PREFIX="/"
|
|
|
|
runHook postInstall
|
2023-04-12 12:48:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Starter of deepin desktop environment";
|
|
|
|
homepage = "https://github.com/linuxdeepin/startdde";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = teams.deepin.members;
|
|
|
|
};
|
|
|
|
}
|