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