nixpkgs/pkgs/desktops/deepin/dde-daemon/default.nix

93 lines
2.4 KiB
Nix
Raw Normal View History

2018-10-21 23:42:02 +02:00
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch, pkgconfig,
dbus-factory, go-dbus-factory, go-gir-generator, go-lib,
deepin-gettext-tools, dde-api, alsaLib, glib, gtk3, libinput, libnl,
librsvg, linux-pam, networkmanager, pulseaudio, xorg, gnome3,
2018-10-30 23:17:45 +01:00
python3Packages, hicolor-icon-theme, go, deepin }:
2018-10-21 23:42:02 +02:00
buildGoPackage rec {
name = "${pname}-${version}";
pname = "dde-daemon";
2018-10-31 01:16:19 +01:00
version = "3.6.0";
2018-10-21 23:42:02 +02:00
goPackagePath = "pkg.deepin.io/dde/daemon";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
2018-10-31 01:16:19 +01:00
sha256 = "0gn2zp34wg79lvzdfla6yb4gs3f9ll83kj765zvig1wpx51nq1aj";
2018-10-21 23:42:02 +02:00
};
patches = [
# https://github.com/linuxdeepin/dde-daemon/issues/51
(fetchpatch {
name = "dde-daemon_3.2.3.patch";
url = https://github.com/jouyouyun/tap-gesture-patches/raw/master/patches/dde-daemon_3.2.3.patch;
sha256 = "0a3xb15czpfl2vajpf7ycw37vr7fbw2png1a67mvjjkgx7d1k7dg";
})
];
goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [
pkgconfig
dbus-factory
go-dbus-factory
go-gir-generator
go-lib
deepin-gettext-tools
dde-api
linux-pam
networkmanager
networkmanager.dev
python3Packages.python
];
buildInputs = [
alsaLib
glib
gnome3.libgudev
gtk3
hicolor-icon-theme
libinput
libnl
librsvg
pulseaudio
];
postPatch = ''
patchShebangs .
sed -i network/nm_generator/Makefile -e 's,/usr/share/gir-1.0/NM-1.0.gir,${networkmanager.dev}/share/gir-1.0/NM-1.0.gir,'
sed -i -e "s|{DESTDIR}/etc|{DESTDIR}$out/etc|" Makefile
sed -i -e "s|{DESTDIR}/var|{DESTDIR}$out/var|" Makefile
sed -i -e "s|{DESTDIR}/lib|{DESTDIR}$out/lib|" Makefile
find -type f -exec sed -i -e "s,/usr/lib/deepin-daemon,$out/lib/deepin-daemon," {} +
'';
buildPhase = ''
make -C go/src/${goPackagePath}
# compilation of the nm module is failing
#make -C go/src/${goPackagePath}/network/nm_generator gen-nm-code
'';
installPhase = ''
make install PREFIX="$out" -C go/src/${goPackagePath}
remove-references-to -t ${go} $out/lib/deepin-daemon/*
'';
2018-10-30 23:17:45 +01:00
passthru.updateScript = deepin.updateScript { inherit name; };
2018-10-21 23:42:02 +02: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 ];
};
}