From 5f5a2d38b3924e053bcfb9396ea286e42127e69b Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 21 Mar 2014 16:32:21 -0500 Subject: [PATCH 1/4] pcsclite: Update from 1.8.10 -> 1.8.11 --- pkgs/tools/security/pcsclite/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index d069c183842..a386d05707c 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; }; } From a7077973a50908f46f796fc85c390d5306e67dd8 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 21 Mar 2014 16:36:49 -0500 Subject: [PATCH 2/4] ccid: Update from 1.4.14 -> 1.4.15 --- pkgs/tools/security/ccid/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/security/ccid/default.nix b/pkgs/tools/security/ccid/default.nix index 4be2393eed5..7d218f49623 100644 --- a/pkgs/tools/security/ccid/default.nix +++ b/pkgs/tools/security/ccid/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pcsclite, pkgconfig, libusb1, perl }: stdenv.mkDerivation rec { - version = "1.4.14"; + version = "1.4.15"; name = "ccid-${version}"; src = fetchurl { - url = "http://ftp.de.debian.org/debian/pool/main/c/ccid/ccid_${version}.orig.tar.bz2"; - sha256 = "0inibkhzk4ghg85jkysscjrzshmxfdzz6b54dqj182l0isn082y5"; + url = "https://alioth.debian.org/frs/download.php/file/3989/${name}.tar.bz2"; + sha256 = "5436182246f15b3e78b1ad6707022b02dc400e3f50c4cb5e5d340a4e716d990a"; }; patchPhase = '' @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { buildInputs = [ pcsclite pkgconfig libusb1 ]; - meta = { + meta = with stdenv.lib; { description = "ccid drivers for pcsclite"; homepage = http://pcsclite.alioth.debian.org/; - license = "GPLv2+"; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [viric]; + platforms = with platforms; linux; }; } From 155dc472d8e260f5c1ddb3b1c9d05cc036efedfd Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 21 Mar 2014 17:52:24 -0500 Subject: [PATCH 3/4] pcscd: Convert to systemd + Fix config file --- nixos/modules/services/hardware/pcscd.nix | 31 ++++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/hardware/pcscd.nix b/nixos/modules/services/hardware/pcscd.nix index 9f389efc06d..6d429c94b28 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}"; }; + }; }; From fff798b018d0d0087aaaef35e102fc15cd7788b5 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 28 Mar 2014 23:43:37 -0400 Subject: [PATCH 4/4] Revert "ccid: Update from 1.4.14 -> 1.4.15" ccid was already updated in master This reverts commit a7077973a50908f46f796fc85c390d5306e67dd8. --- pkgs/tools/security/ccid/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/security/ccid/default.nix b/pkgs/tools/security/ccid/default.nix index 7d218f49623..4be2393eed5 100644 --- a/pkgs/tools/security/ccid/default.nix +++ b/pkgs/tools/security/ccid/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pcsclite, pkgconfig, libusb1, perl }: stdenv.mkDerivation rec { - version = "1.4.15"; + version = "1.4.14"; name = "ccid-${version}"; src = fetchurl { - url = "https://alioth.debian.org/frs/download.php/file/3989/${name}.tar.bz2"; - sha256 = "5436182246f15b3e78b1ad6707022b02dc400e3f50c4cb5e5d340a4e716d990a"; + url = "http://ftp.de.debian.org/debian/pool/main/c/ccid/ccid_${version}.orig.tar.bz2"; + sha256 = "0inibkhzk4ghg85jkysscjrzshmxfdzz6b54dqj182l0isn082y5"; }; patchPhase = '' @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { buildInputs = [ pcsclite pkgconfig libusb1 ]; - meta = with stdenv.lib; { + meta = { description = "ccid drivers for pcsclite"; homepage = http://pcsclite.alioth.debian.org/; - license = licenses.gpl2Plus; - maintainers = with maintainers; [viric]; - platforms = with platforms; linux; + license = "GPLv2+"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; }; }