Add a small test to verify that the pcscd socket unit works, and that a client can connect (which requires auto-starting pcscd.service).
30 lines
452 B
Nix
30 lines
452 B
Nix
{
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
{
|
|
name = "pcsclite";
|
|
meta.maintainers = [ lib.maintainers.bjornfor ];
|
|
|
|
nodes = {
|
|
machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
environment.systemPackages = [
|
|
pkgs.pcsc-tools
|
|
];
|
|
services.pcscd = {
|
|
enable = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("pcscd.socket")
|
|
|
|
with subtest("client can connect"):
|
|
machine.succeed("pcsc_scan -r")
|
|
'';
|
|
}
|