2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-02 06:55:45 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
|
|
|
, gettext
|
|
|
|
, flex
|
|
|
|
, perl
|
2021-01-17 03:51:22 +00:00
|
|
|
, pkg-config
|
2020-04-02 06:55:45 +01:00
|
|
|
, pcsclite
|
|
|
|
, libusb1
|
|
|
|
, libiconv
|
|
|
|
}:
|
2018-11-07 23:53:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-01-29 15:19:22 +00:00
|
|
|
version = "1.1.8";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "acsccid";
|
2018-11-07 23:53:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "acshk";
|
2020-01-29 15:19:22 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "12aahrvsk21qgpjwcrr01s742ixs44nmjkvcvqyzhqb307x1rrn3";
|
2018-11-07 23:53:36 +00:00
|
|
|
};
|
|
|
|
|
2020-04-02 06:55:45 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 03:51:22 +00:00
|
|
|
pkg-config
|
2020-04-02 06:55:45 +01:00
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
|
|
|
gettext
|
|
|
|
flex
|
|
|
|
perl
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pcsclite
|
|
|
|
libusb1
|
2021-01-15 09:19:50 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-04-02 06:55:45 +01:00
|
|
|
libiconv
|
|
|
|
];
|
2018-11-07 23:53:36 +00:00
|
|
|
|
2020-04-02 06:55:45 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-usbdropdir=${placeholder "out"}/pcsc/drivers"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2018-11-07 23:53:36 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -e s_/bin/echo_echo_g -i src/Makefile.am
|
|
|
|
patchShebangs src/convert_version.pl
|
|
|
|
patchShebangs src/create_Info_plist.pl
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
libtoolize --force
|
|
|
|
aclocal
|
|
|
|
autoheader
|
|
|
|
automake --force-missing --add-missing
|
|
|
|
autoconf
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "A PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card readers";
|
2018-11-07 23:53:36 +00:00
|
|
|
longDescription = ''
|
|
|
|
acsccid is a PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card
|
|
|
|
readers. This library provides a PC/SC IFD handler implementation and
|
|
|
|
communicates with the readers through the PC/SC Lite resource manager (pcscd).
|
|
|
|
|
|
|
|
acsccid is based on ccid. See CCID free software driver for more
|
|
|
|
information:
|
|
|
|
https://ccid.apdu.fr/
|
|
|
|
|
|
|
|
It can be enabled in /etc/nixos/configuration.nix by adding:
|
|
|
|
services.pcscd.enable = true;
|
|
|
|
services.pcscd.plugins = [ pkgs.acsccid ];
|
|
|
|
'';
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ roberth ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|