mako: simplify with a rmDbusServices helper

This commit is contained in:
Colin 2023-09-11 22:56:54 +00:00
parent c55ea59c4f
commit df2a2fe427
3 changed files with 18 additions and 6 deletions

View File

@ -3,12 +3,8 @@
{ lib, config, pkgs, ... }:
{
sane.programs.mako = {
package = pkgs.mako.overrideAttrs (upstream: {
postInstall = (upstream.postInstall or "") + ''
# we control mako as a systemd service, so have dbus not automatically activate it.
rm $out/share/dbus-1/services/fr.emersion.mako.service
'';
});
# we control mako as a systemd service, so have dbus not automatically activate it.
package = pkgs.rmDbusServices pkgs.mako;
fs.".config/mako/config".symlink.text = ''
# notification interaction mapping
# "on-touch" defaults to "dismiss", which isn't nice for touchscreens.

View File

@ -0,0 +1,12 @@
{ symlinkJoin }:
{
# given some package, create a new package which symlinks every file of the original
# *except* for its dbus files.
rmDbusServices = pkg: symlinkJoin {
name = pkg.name or pkg.pname;
paths = [ pkg ];
postBuild = ''
rm -rf $out/share/dbus-1
'';
};
}

View File

@ -60,6 +60,10 @@ let
sxmo-utils-latest = sxmo-utils'.latest;
tow-boot-pinephone = callPackage ./additional/tow-boot-pinephone { };
tree-sitter-nix-shell = callPackage ./additional/tree-sitter-nix-shell { };
trivial-builders = lib.recurseIntoAttrs (callPackage ./additional/trivial-builders { });
inherit (trivial-builders)
rmDbusServices
;
unftp = callPackage ./additional/unftp { };
xdg-terminal-exec = callPackage ./additional/xdg-terminal-exec { };
zecwallet-light-cli = callPackage ./additional/zecwallet-light-cli { };