@@ -0,0 +1,41 @@
1+{ stdenv, fetchurl, pkgconfig, pcsclite , libusb }:
2+
3+stdenv.mkDerivation rec {
4+ version = "1.7.11";
5+ name = "libacr38u-${version}";
6+
7+ src = fetchurl {
8+ url = "http://http.debian.net/debian/pool/main/a/acr38/acr38_1.7.11.orig.tar.bz2";
9+ sha256 = "0lxbq17y51cablx6bcd89klwnyigvkz0rsf9nps1a97ggnllyzkx";
10+ };
11+
12+ doCheck = true;
13+
14+ nativeBuildInputs = [ pkgconfig ];
15+ buildInputs = [ pcsclite libusb ];
16+
17+ preBuild = ''
18+ makeFlagsArray=(usbdropdir="$out/pcsc/drivers");
19+ '';
20+
21+ meta = with stdenv.lib; {
22+ description = "ACR38U smartcard reader driver for pcsclite";
23+ longDescription = ''
24+ A PC/SC IFD handler implementation for the ACS ACR38U
25+ smartcard readers. This driver is for the non-CCID version only.
26+
27+ This package is needed to communicate with the ACR38U smartcard readers through
28+ the PC/SC Lite resource manager (pcscd).
29+
30+ It can be enabled in /etc/nixos/configuration.nix by adding:
31+ services.pcscd.enable = true;
32+ services.pcscd.plugins = [ libacr38u ];
33+
34+ The package is based on the debian package libacr38u.
35+ '';
36+ homepage = http://www.acs.com.hk;
37+ license = licenses.lgpl2Plus;
38+ maintainers = with maintainers; [ berce ];
39+ platforms = with platforms; unix;
40+ };
41+}