parcellite: add basic test case

This commit is contained in:
Robert Helgesson 2022-12-28 22:16:14 +01:00
parent d38dbec809
commit 8745cc9a21
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 34 additions and 1 deletions

View file

@ -50,7 +50,7 @@ in {
Service = { Service = {
ExecStart = "${cfg.package}/bin/${cfg.package.pname} ${ ExecStart = "${cfg.package}/bin/${cfg.package.pname} ${
lib.concatStringsSep " " cfg.extraOptions escapeShellArgs cfg.extraOptions
}"; }";
Restart = "on-abort"; Restart = "on-abort";
}; };

View file

@ -185,6 +185,7 @@ import nmt {
./modules/services/mpd ./modules/services/mpd
./modules/services/mpdris2 ./modules/services/mpdris2
./modules/services/pantalaimon ./modules/services/pantalaimon
./modules/services/parcellite
./modules/services/pbgopy ./modules/services/pbgopy
./modules/services/picom ./modules/services/picom
./modules/services/playerctld ./modules/services/playerctld

View file

@ -0,0 +1 @@
{ parcellite = ./parcellite.nix; }

View file

@ -0,0 +1,13 @@
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@parcellite@/bin/parcellite '--no-icon'
Restart=on-abort
[Unit]
After=graphical-session-pre.target
After=tray.target
Description=Lightweight GTK+ clipboard manager
PartOf=graphical-session.target
Requires=tray.target

View file

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
services.parcellite = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "parcellite";
outPath = "@parcellite@";
};
extraOptions = [ "--no-icon" ];
};
nmt.script = ''
assertFileContent \
"home-files/.config/systemd/user/parcellite.service" \
${./parcellite-expected.service}
'';
}