3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyscard/default.nix

30 lines
852 B
Nix
Raw Normal View History

{ stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }:
buildPythonPackage rec {
2018-06-21 06:37:18 +01:00
version = "1.9.7";
pname = "pyscard";
src = fetchPypi {
inherit pname version;
2018-06-21 06:37:18 +01:00
sha256 = "412c74c83e7401566e9d3d7b8b5ca965e74582a1f33179b3c1fabf1da73ebf80";
};
postPatch = ''
2018-06-21 11:40:15 +01:00
sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
2017-01-19 14:20:54 +00:00
-i smartcard/scard/winscarddll.c
'';
2018-06-21 11:40:15 +01:00
NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
2017-01-19 14:20:54 +00:00
propagatedBuildInputs = [ pcsclite ];
buildInputs = stdenv.lib.optional stdenv.isDarwin PCSC;
nativeBuildInputs = [ swig ];
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 ];
};
}