2018-10-21 22:42:02 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig,
|
|
|
|
dbus-factory, go-dbus-factory, go-gir-generator, go-lib,
|
2018-11-27 17:23:55 +00:00
|
|
|
deepin-gettext-tools, dde-api, deepin-desktop-schemas,
|
|
|
|
deepin-wallpapers, deepin-desktop-base, alsaLib, glib, gtk3,
|
|
|
|
libgudev, libinput, libnl, librsvg, linux-pam, networkmanager,
|
2019-06-16 20:59:06 +01:00
|
|
|
pulseaudio, python3, hicolor-icon-theme, glibc, tzdata, go,
|
2019-06-24 02:40:01 +01:00
|
|
|
deepin, makeWrapper, xkeyboard_config, wrapGAppsHook }:
|
2018-10-21 22:42:02 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "dde-daemon";
|
2019-06-26 03:07:43 +01:00
|
|
|
version = "3.27.2.6";
|
2018-10-21 22:42:02 +01:00
|
|
|
|
|
|
|
goPackagePath = "pkg.deepin.io/dde/daemon";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-06-26 03:07:43 +01:00
|
|
|
sha256 = "14g138h23f1lh1y98pdrfhnph1m7pw8lq8ypiwv9qf3fmdyn35d4";
|
2018-10-21 22:42:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# https://github.com/linuxdeepin/dde-daemon/issues/51
|
|
|
|
(fetchpatch {
|
2018-11-27 17:23:55 +00:00
|
|
|
url = https://github.com/jouyouyun/tap-gesture-patches/raw/master/patches/dde-daemon_3.8.0.patch;
|
|
|
|
sha256 = "1ampdsp9zlg263flswdw9gj10n7gxh7zi6w6z9jgh29xlai05pvh";
|
2018-10-21 22:42:02 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
dbus-factory
|
|
|
|
go-dbus-factory
|
|
|
|
go-gir-generator
|
|
|
|
go-lib
|
|
|
|
deepin-gettext-tools
|
|
|
|
linux-pam
|
|
|
|
networkmanager
|
|
|
|
networkmanager.dev
|
2018-11-27 17:23:55 +00:00
|
|
|
python3
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
deepin.setupHook
|
2018-10-21 22:42:02 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsaLib
|
2018-11-27 17:23:55 +00:00
|
|
|
dde-api
|
|
|
|
deepin-desktop-base
|
|
|
|
deepin-desktop-schemas
|
|
|
|
deepin-wallpapers
|
2018-10-21 22:42:02 +01:00
|
|
|
glib
|
2018-11-27 17:23:55 +00:00
|
|
|
libgudev
|
2018-10-21 22:42:02 +01:00
|
|
|
gtk3
|
|
|
|
hicolor-icon-theme
|
|
|
|
libinput
|
|
|
|
libnl
|
|
|
|
librsvg
|
|
|
|
pulseaudio
|
2018-11-27 17:23:55 +00:00
|
|
|
tzdata
|
2019-06-24 02:40:01 +01:00
|
|
|
xkeyboard_config
|
2018-10-21 22:42:02 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-04-19 14:42:17 +01:00
|
|
|
searchHardCodedPaths # debugging
|
2018-11-27 17:23:55 +00:00
|
|
|
patchShebangs network/nm_generator/gen_nm_consts.py
|
2018-10-21 22:42:02 +01:00
|
|
|
|
2018-11-27 17:23:55 +00:00
|
|
|
fixPath $out /usr/share/dde/data launcher/manager.go dock/dock_manager_init.go
|
2019-06-24 02:40:01 +01:00
|
|
|
fixPath $out /usr/share/dde-daemon launcher/manager.go gesture/config.go
|
2018-11-27 17:23:55 +00:00
|
|
|
fixPath ${networkmanager.dev} /usr/share/gir-1.0/NM-1.0.gir network/nm_generator/Makefile
|
|
|
|
fixPath ${glibc.bin} /usr/bin/getconf systeminfo/utils.go
|
|
|
|
fixPath ${deepin-desktop-base} /etc/deepin-version systeminfo/version.go accounts/deepinversion.go
|
|
|
|
fixPath ${tzdata} /usr/share/zoneinfo timedate/zoneinfo/zone.go
|
|
|
|
fixPath ${dde-api} /usr/lib/deepin-api grub2/modify_manger.go accounts/image_blur.go
|
|
|
|
fixPath ${deepin-wallpapers} /usr/share/wallpapers appearance/background/list.go accounts/user.go
|
2019-06-24 02:40:01 +01:00
|
|
|
fixPath ${xkeyboard_config} /usr/share/X11/xkb inputdevices/layout_list.go
|
|
|
|
|
|
|
|
# TODO: deepin-system-monitor comes from dde-extra
|
2018-10-21 22:42:02 +01:00
|
|
|
|
|
|
|
sed -i -e "s|{DESTDIR}/etc|{DESTDIR}$out/etc|" Makefile
|
|
|
|
sed -i -e "s|{DESTDIR}/lib|{DESTDIR}$out/lib|" Makefile
|
2019-04-19 14:42:17 +01:00
|
|
|
sed -i -e "s|{DESTDIR}/var|{DESTDIR}$out/var|" Makefile
|
2018-10-21 22:42:02 +01:00
|
|
|
|
|
|
|
find -type f -exec sed -i -e "s,/usr/lib/deepin-daemon,$out/lib/deepin-daemon," {} +
|
2018-11-27 17:23:55 +00:00
|
|
|
|
2019-04-19 14:42:17 +01:00
|
|
|
# This package wants to install polkit local authority files into
|
|
|
|
# /var/lib. Nix does not allow a package to install files into /var/lib
|
|
|
|
# because it is outside of the Nix store and should contain applications
|
|
|
|
# state information (persistent data modified by programs as they
|
|
|
|
# run). Polkit looks for them in both /etc/polkit-1 and
|
|
|
|
# /var/lib/polkit-1 (with /etc having priority over /var/lib). An
|
|
|
|
# work around is to install them to $out/etc and simlnk them to
|
|
|
|
# /etc in the deepin module.
|
|
|
|
|
|
|
|
sed -i -e "s,/var/lib/polkit-1,/etc/polkit-1," Makefile
|
2018-10-21 22:42:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2019-05-04 12:41:59 +01:00
|
|
|
export PAM_MODULE_DIR="$out/lib/security"
|
2018-10-21 22:42:02 +01:00
|
|
|
# compilation of the nm module is failing
|
|
|
|
#make -C go/src/${goPackagePath}/network/nm_generator gen-nm-code
|
2018-11-27 17:23:55 +00:00
|
|
|
make -C go/src/${goPackagePath}
|
2018-10-21 22:42:02 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make install PREFIX="$out" -C go/src/${goPackagePath}
|
|
|
|
remove-references-to -t ${go} $out/lib/deepin-daemon/*
|
2018-11-27 17:23:55 +00:00
|
|
|
searchHardCodedPaths $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# wrapGAppsHook does not work with binaries outside of $out/bin or $out/libexec
|
|
|
|
for binary in $out/lib/deepin-daemon/*; do
|
2019-09-10 07:13:10 +01:00
|
|
|
wrapGApp "$binary"
|
2018-11-27 17:23:55 +00:00
|
|
|
done
|
2019-04-19 14:42:17 +01:00
|
|
|
|
|
|
|
searchHardCodedPaths $out # debugging
|
2018-10-21 22:42:02 +01:00
|
|
|
'';
|
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
passthru.updateScript = deepin.updateScript { inherit ;name = "${pname}-${version}"; };
|
2018-10-30 22:17:45 +00:00
|
|
|
|
2018-10-21 22:42:02 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Daemon for handling Deepin Desktop Environment session settings";
|
|
|
|
homepage = https://github.com/linuxdeepin/dde-daemon;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ romildo ];
|
|
|
|
};
|
|
|
|
}
|