ccid: 1.5.2 -> 1.5.4

https://salsa.debian.org/rousseau/CCID/-/compare/1.5.2...1.5.4
This commit is contained in:
Anthony Roussel 2023-12-06 20:20:18 +01:00
parent 1490bec746
commit 6899899596
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E

View file

@ -1,20 +1,22 @@
{ lib
, stdenv
, fetchurl
, flex
, pcsclite
, pkg-config
, libusb1
, perl
, zlib
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "ccid";
version = "1.5.2";
version = "1.5.4";
src = fetchurl {
url = "https://ccid.apdu.fr/files/${pname}-${version}.tar.bz2";
sha256 = "sha256-E5NEh+b4tI9pmhbTZ8x6GvejyodN5yGsbpYzvrhuchk=";
hash = "sha256-boMq3Bcuzc/e4rVvMxRGhIgsvpctr/GTjnqcc6ZPiL8=";
};
postPatch = ''
@ -22,12 +24,36 @@ stdenv.mkDerivation rec {
substituteInPlace src/Makefile.in --replace /bin/echo echo
'';
preConfigure = ''
configureFlagsArray+=("--enable-usbdropdir=$out/pcsc/drivers")
'';
configureFlags = [
"--enable-twinserial"
"--enable-serialconfdir=${placeholder "out"}/etc/reader.conf.d"
"--enable-ccidtwindir=${placeholder "out"}/pcsc/drivers/serial"
"--enable-usbdropdir=${placeholder "out"}/pcsc/drivers"
];
nativeBuildInputs = [ pkg-config perl ];
buildInputs = [ pcsclite libusb1 ];
# error: call to undeclared function 'InterruptRead';
# ISO C99 and later do not support implicit function declarations
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
nativeBuildInputs = [
flex
pkg-config
perl
];
buildInputs = [
pcsclite
libusb1
zlib
];
postInstall = ''
install -Dm 0444 -t $out/lib/udev/rules.d src/92_pcscd_ccid.rules
substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \
--replace "/usr/sbin/pcscd" "${pcsclite}/bin/pcscd"
'';
# The resulting shared object ends up outside of the default paths which are
# usually getting stripped.