nixpkgs/pkgs/development/python-modules/pyscard/default.nix

30 lines
804 B
Nix
Raw Normal View History

2017-01-19 14:20:54 +00:00
{ stdenv, fetchurl, buildPythonPackage, swig, pcsclite }:
buildPythonPackage rec {
version = "1.9.5";
pname = "pyscard";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://pypi/p/pyscard/${name}.tar.gz";
sha256 = "7eef027e1939b7595fc13c03616f262f90d118594fdb6f7620af46b54fa06835";
};
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-19 14:20:54 +00:00
NIX_CFLAGS_COMPILE = "-isystem ${pcsclite}/include/PCSC/";
2017-01-19 14:20:54 +00:00
propagatedBuildInputs = [ pcsclite ];
buildInputs = [ 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 ];
};
}