2017-01-19 14:20:54 +00:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, swig, pcsclite }:
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-01-19 14:20:54 +00:00
|
|
|
version = "1.9.4";
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "pyscard";
|
|
|
|
name = "${pname}-${version}";
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/p/pyscard/${name}.tar.gz";
|
|
|
|
sha256 = "0gn0p4p8dhk99g8vald0dcnh45jbf82bj72n4djyr8b4hawkck4v";
|
|
|
|
};
|
|
|
|
|
2017-01-19 14:20:54 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -e 's!"libpcsclite\.so\.1"!"${pcsclite}/lib/libpcsclite.so.1"!' \
|
|
|
|
-i smartcard/scard/winscarddll.c
|
|
|
|
'';
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2017-01-19 14:20:54 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-isystem ${pcsclite}/include/PCSC/";
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2017-01-19 14:20:54 +00:00
|
|
|
propagatedBuildInputs = [ pcsclite ];
|
|
|
|
buildInputs = [ swig ];
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://pyscard.sourceforge.io/";
|
|
|
|
description = "Smartcard library for python";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2017-01-19 14:20:54 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ layus ];
|
2017-01-17 01:18:27 +00:00
|
|
|
};
|
|
|
|
}
|