2017-09-10 04:07:14 +01:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, swig, pcsclite, PCSC }:
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-06-21 06:37:18 +01:00
|
|
|
version = "1.9.7";
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "pyscard";
|
|
|
|
name = "${pname}-${version}";
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/p/pyscard/${name}.tar.gz";
|
2018-06-21 06:37:18 +01:00
|
|
|
sha256 = "412c74c83e7401566e9d3d7b8b5ca965e74582a1f33179b3c1fabf1da73ebf80";
|
2017-01-17 01:18:27 +00:00
|
|
|
};
|
|
|
|
|
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 ];
|
2017-09-10 04:07:14 +01:00
|
|
|
buildInputs = [ swig ] ++ stdenv.lib.optional stdenv.isDarwin PCSC;
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://pyscard.sourceforge.io/;
|
2017-01-17 01:18:27 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|