Merge pull request #272682 from anthonyroussel/updates/ccid

ccid: 1.5.2 -> 1.5.4

authored by Weijia Wang and committed by GitHub 53aea4e8 29c3c36d

+49 -10
+49 -10
pkgs/tools/security/ccid/default.nix
··· 1 - { lib, stdenv, fetchurl, pcsclite, pkg-config, libusb1, perl }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , flex 5 + , pcsclite 6 + , pkg-config 7 + , libusb1 8 + , perl 9 + , zlib 10 + , gitUpdater 11 + }: 2 12 3 13 stdenv.mkDerivation rec { 4 14 pname = "ccid"; 5 - version = "1.5.2"; 15 + version = "1.5.4"; 6 16 7 17 src = fetchurl { 8 18 url = "https://ccid.apdu.fr/files/${pname}-${version}.tar.bz2"; 9 - sha256 = "sha256-E5NEh+b4tI9pmhbTZ8x6GvejyodN5yGsbpYzvrhuchk="; 19 + hash = "sha256-boMq3Bcuzc/e4rVvMxRGhIgsvpctr/GTjnqcc6ZPiL8="; 10 20 }; 11 21 12 22 postPatch = '' ··· 14 24 substituteInPlace src/Makefile.in --replace /bin/echo echo 15 25 ''; 16 26 17 - preConfigure = '' 18 - configureFlagsArray+=("--enable-usbdropdir=$out/pcsc/drivers") 27 + configureFlags = [ 28 + "--enable-twinserial" 29 + "--enable-serialconfdir=${placeholder "out"}/etc/reader.conf.d" 30 + "--enable-ccidtwindir=${placeholder "out"}/pcsc/drivers/serial" 31 + "--enable-usbdropdir=${placeholder "out"}/pcsc/drivers" 32 + ]; 33 + 34 + # error: call to undeclared function 'InterruptRead'; 35 + # ISO C99 and later do not support implicit function declarations 36 + env = lib.optionalAttrs stdenv.cc.isClang { 37 + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 38 + }; 39 + 40 + nativeBuildInputs = [ 41 + flex 42 + pkg-config 43 + perl 44 + ]; 45 + 46 + buildInputs = [ 47 + pcsclite 48 + libusb1 49 + zlib 50 + ]; 51 + 52 + postInstall = '' 53 + install -Dm 0444 -t $out/lib/udev/rules.d src/92_pcscd_ccid.rules 54 + substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \ 55 + --replace "/usr/sbin/pcscd" "${pcsclite}/bin/pcscd" 19 56 ''; 20 57 21 - nativeBuildInputs = [ pkg-config perl ]; 22 - buildInputs = [ pcsclite libusb1 ]; 23 - 24 58 # The resulting shared object ends up outside of the default paths which are 25 59 # usually getting stripped. 26 60 stripDebugList = ["pcsc"]; 27 61 62 + passthru.updateScript = gitUpdater { 63 + url = "https://salsa.debian.org/rousseau/CCID.git"; 64 + }; 65 + 28 66 meta = with lib; { 29 - description = "ccid drivers for pcsclite"; 67 + description = "PC/SC driver for USB CCID smart card readers"; 30 68 homepage = "https://ccid.apdu.fr/"; 31 - license = licenses.gpl2Plus; 69 + license = licenses.lgpl21Plus; 70 + maintainers = [ maintainers.anthonyroussel ]; 32 71 platforms = platforms.unix; 33 72 }; 34 73 }