2018-06-23 15:27:58 +02:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }:
|
2017-01-17 02:18:27 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-06-21 07:37:18 +02:00
|
|
|
version = "1.9.7";
|
2017-05-27 11:25:35 +02:00
|
|
|
pname = "pyscard";
|
2017-01-17 02:18:27 +01:00
|
|
|
|
2018-06-23 15:27:58 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-21 07:37:18 +02:00
|
|
|
sha256 = "412c74c83e7401566e9d3d7b8b5ca965e74582a1f33179b3c1fabf1da73ebf80";
|
2017-01-17 02:18:27 +01:00
|
|
|
};
|
|
|
|
|
2018-06-23 15:27:58 +02:00
|
|
|
postPatch = ''
|
2018-06-21 12:40:15 +02:00
|
|
|
sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
|
2017-01-19 15:20:54 +01:00
|
|
|
-i smartcard/scard/winscarddll.c
|
|
|
|
'';
|
2017-01-17 02:18:27 +01:00
|
|
|
|
2018-06-21 12:40:15 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
|
2017-01-17 02:18:27 +01:00
|
|
|
|
2017-01-19 15:20:54 +01:00
|
|
|
propagatedBuildInputs = [ pcsclite ];
|
2017-09-10 05:07:14 +02:00
|
|
|
buildInputs = [ swig ] ++ stdenv.lib.optional stdenv.isDarwin PCSC;
|
2017-01-17 02:18:27 +01:00
|
|
|
|
|
|
|
meta = {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://pyscard.sourceforge.io/;
|
2017-01-17 02:18:27 +01:00
|
|
|
description = "Smartcard library for python";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2017-01-19 15:20:54 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ layus ];
|
2017-01-17 02:18:27 +01:00
|
|
|
};
|
|
|
|
}
|