diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix index 9f389efc06d4..6d429c94b28f 100644 --- a/nixos/modules/services/hardware/pcscd.nix +++ b/nixos/modules/services/hardware/pcscd.nix @@ -1,5 +1,9 @@ { config, pkgs, ... }: +let + cfgFile = pkgs.writeText "reader.conf" ""; +in + with pkgs.lib; { @@ -24,22 +28,19 @@ with pkgs.lib; config = mkIf config.services.pcscd.enable { - jobs.pcscd = - { description = "PCSC-Lite daemon"; - - startOn = "started udev"; - - daemonType = "fork"; - - # Add to the drivers directory the only drivers we have by now: ccid - preStart = '' - mkdir -p /var/lib/pcsc - rm -Rf /var/lib/pcsc/drivers - ln -s ${pkgs.ccid}/pcsc/drivers /var/lib/pcsc/ - ''; - - exec = "${pkgs.pcsclite}/sbin/pcscd"; + systemd.services.pcscd = { + description = "PCSC-Lite daemon"; + wantedBy = [ "multi-user.target" ]; + preStart = '' + mkdir -p /var/lib/pcsc + rm -Rf /var/lib/pcsc/drivers + ln -s ${pkgs.ccid}/pcsc/drivers /var/lib/pcsc/ + ''; + serviceConfig = { + Type = "forking"; + ExecStart = "${pkgs.pcsclite}/sbin/pcscd -c ${cfgFile}"; }; + }; }; diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index 7f13ffc8db5f..2737cc435752 100644 --- a/pkgs/tools/security/pcsclite/default.nix +++ b/pkgs/tools/security/pcsclite/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, pkgconfig, udev, dbus_libs, perl }: stdenv.mkDerivation rec { - version = "1.8.10"; + version = "1.8.11"; name = "pcsclite-${version}"; src = fetchurl { - url = "https://alioth.debian.org/frs/download.php/file/3963/pcsc-lite-${version}.tar.bz2"; - sha256 = "04i63zi9ayg38z3cahp6gf3rgx23w17bmcpdccm2hvaj63blnz30"; + url = "https://alioth.debian.org/frs/download.php/file/3991/pcsc-lite-${version}.tar.bz2"; + sha256 = "945041c94c53959ae5a767616a4ec5099fe67f549bfd344e8bd0cfe7a3c71ac6"; }; # The OS should care on preparing the drivers into this location @@ -20,11 +20,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; - meta = { + meta = with stdenv.lib; { description = "Middleware to access a smart card using SCard API (PC/SC)"; homepage = http://pcsclite.alioth.debian.org/; - license = "BSD"; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + license = licenses.bsd3; + maintainers = with maintainers; [viric]; + platforms = with platforms; linux; }; }