mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/pcscd: expose package as option; pcsclite: enable structuredAttrs, separateDebugInfo, strictDeps (#525482)
This commit is contained in:
commit
73809269bb
2 changed files with 12 additions and 5 deletions
|
|
@ -10,8 +10,6 @@ let
|
|||
builtins.concatStringsSep "\n\n" config.services.pcscd.readerConfigs
|
||||
);
|
||||
|
||||
package = if config.security.polkit.enable then pkgs.pcscliteWithPolkit else pkgs.pcsclite;
|
||||
|
||||
pluginEnv = pkgs.buildEnv {
|
||||
name = "pcscd-plugins";
|
||||
paths = map (p: "${p}/pcsc/drivers") config.services.pcscd.plugins;
|
||||
|
|
@ -36,6 +34,11 @@ in
|
|||
options.services.pcscd = {
|
||||
enable = lib.mkEnableOption "PCSC-Lite daemon, to access smart cards using SCard API (PC/SC)";
|
||||
|
||||
package = (lib.mkPackageOption pkgs "pcsclite" { }) // {
|
||||
default = if config.security.polkit.enable then pkgs.pcscliteWithPolkit else pkgs.pcsclite;
|
||||
defaultText = lib.literalExpression "if config.security.polkit.enable then pkgs.pcscliteWithPolkit else pkgs.pcsclite";
|
||||
};
|
||||
|
||||
plugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
defaultText = lib.literalExpression "[ pkgs.ccid ]";
|
||||
|
|
@ -101,8 +104,8 @@ in
|
|||
config = lib.mkIf config.services.pcscd.enable {
|
||||
environment.etc."reader.conf".source = cfgFile;
|
||||
|
||||
environment.systemPackages = [ package ];
|
||||
systemd.packages = [ package ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
services.pcscd.plugins = [ pkgs.ccid ];
|
||||
|
||||
|
|
@ -133,7 +136,7 @@ in
|
|||
# https://github.com/NixOS/nixpkgs/issues/121088
|
||||
serviceConfig.ExecStart = [
|
||||
""
|
||||
"${lib.getExe package} -f -x -c ${cfgFile} ${lib.escapeShellArgs cfg.extraArgs}"
|
||||
"${lib.getExe cfg.package} -f -x -c ${cfgFile} ${lib.escapeShellArgs cfg.extraArgs}"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
moveToOutput bin/pcsc-spy "$dev"
|
||||
'';
|
||||
|
||||
__structuredAttrs = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue