pkgs.rmDbusServices: also remove dbus properties from .desktop files

This commit is contained in:
2024-02-15 11:35:52 +00:00
parent 582a003739
commit 40af8b95fd

View File

@@ -2,11 +2,17 @@
{ {
# given some package, create a new package which symlinks every file of the original # given some package, create a new package which symlinks every file of the original
# *except* for its dbus files. # *except* for its dbus files.
# in addition, edit its .desktop files to clarify that it can't be "dbus activated".
rmDbusServices = pkg: symlinkJoin { rmDbusServices = pkg: symlinkJoin {
name = pkg.name or pkg.pname; name = pkg.name or pkg.pname;
paths = [ pkg ]; paths = [ pkg ];
postBuild = '' postBuild = ''
rm -rf $out/share/dbus-1 rm -rf $out/share/dbus-1
for d in $out/share/applications/*.desktop; do
if substitute "$d" ./substituteResult --replace-fail DBusActivatable=true DBusActivatable=false; then
mv ./substituteResult "$d"
fi
done
''; '';
}; };
} }