nixpkgs/pkgs/tools/security/pcsclite/default.nix

43 lines
1.4 KiB
Nix
Raw Normal View History

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