3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyscard/default.nix
R. RyanTM 7b8c48444d python37Packages.pyscard: 1.9.7 -> 1.9.8
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-pyscard/versions
2019-04-02 11:07:52 -07:00

30 lines
840 B
Nix

{ stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }:
buildPythonPackage rec {
version = "1.9.8";
pname = "pyscard";
src = fetchPypi {
inherit pname version;
sha256 = "15fh00z1an6r5j7hrz3jlq0rb3jygwf3x4jcwsa008bv8vpcg7gm";
};
postPatch = ''
sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
-i smartcard/scard/winscarddll.c
'';
NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
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;
maintainers = with stdenv.lib.maintainers; [ layus ];
};
}