2016-08-12 06:51:32 +03:00
|
|
|
{ stdenv, fetchurl, pkgconfig, udev, dbus_libs, perl, python2
|
|
|
|
, IOKit ? null }:
|
2011-09-19 17:01:47 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-06-04 14:20:17 +03:00
|
|
|
name = "pcsclite-${version}";
|
2017-05-24 23:18:33 +03:00
|
|
|
version = "1.8.21";
|
2010-01-09 20:35:57 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-05-24 23:18:33 +03:00
|
|
|
# This URL changes in unpredictable ways, so it is not sensible
|
2017-01-11 15:31:06 +03:00
|
|
|
# to put a version variable in there.
|
2017-05-24 23:18:33 +03:00
|
|
|
url = "https://alioth.debian.org/frs/download.php/file/4216/pcsc-lite-1.8.21.tar.bz2";
|
|
|
|
sha256 = "1b8kwl81f6s3y7qh68ahr8sp8a0w6m464v9b3s4zxq2cgpmnaczy";
|
2010-01-09 20:35:57 +03:00
|
|
|
};
|
|
|
|
|
2016-06-04 13:42:16 +03:00
|
|
|
patches = [ ./no-dropdir-literals.patch ];
|
|
|
|
|
2013-02-23 17:00:49 +04:00
|
|
|
configureFlags = [
|
2015-08-06 05:25:37 +03:00
|
|
|
# The OS should care on preparing the drivers into this location
|
2013-02-23 17:00:49 +04:00
|
|
|
"--enable-usbdropdir=/var/lib/pcsc/drivers"
|
2015-08-06 05:25:37 +03:00
|
|
|
"--enable-confdir=/etc"
|
2016-06-04 16:52:04 +03:00
|
|
|
"--enable-ipcdir=/run/pcscd"
|
2015-12-03 21:13:31 +03:00
|
|
|
] ++ stdenv.lib.optional stdenv.isLinux
|
|
|
|
"--with-systemdsystemunitdir=\${out}/etc/systemd/system";
|
2010-01-09 20:35:57 +03:00
|
|
|
|
2016-06-04 13:42:16 +03:00
|
|
|
postConfigure = ''
|
|
|
|
sed -i -re '/^#define *PCSCLITE_HP_DROPDIR */ {
|
|
|
|
s/(DROPDIR *)(.*)/\1(getenv("PCSCLITE_HP_DROPDIR") ? : \2)/
|
|
|
|
}' config.h
|
|
|
|
'';
|
|
|
|
|
2015-11-13 14:41:19 +03:00
|
|
|
nativeBuildInputs = [ pkgconfig perl python2 ];
|
2016-08-12 06:51:32 +03:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ udev dbus_libs ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ];
|
2010-01-09 20:35:57 +03:00
|
|
|
|
2014-03-22 01:32:21 +04:00
|
|
|
meta = with stdenv.lib; {
|
2010-01-09 20:35:57 +03:00
|
|
|
description = "Middleware to access a smart card using SCard API (PC/SC)";
|
|
|
|
homepage = http://pcsclite.alioth.debian.org/;
|
2014-03-22 01:32:21 +04:00
|
|
|
license = licenses.bsd3;
|
2014-09-15 11:55:47 +04:00
|
|
|
maintainers = with maintainers; [ viric wkennington ];
|
2015-12-03 21:13:31 +03:00
|
|
|
platforms = with platforms; unix;
|
2010-01-09 20:35:57 +03:00
|
|
|
};
|
|
|
|
}
|