depot/third_party/nixpkgs/pkgs/tools/security/ccid/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

34 lines
894 B
Nix

{ lib, stdenv, fetchurl, pcsclite, pkg-config, libusb1, perl }:
stdenv.mkDerivation rec {
pname = "ccid";
version = "1.5.2";
src = fetchurl {
url = "https://ccid.apdu.fr/files/${pname}-${version}.tar.bz2";
sha256 = "sha256-E5NEh+b4tI9pmhbTZ8x6GvejyodN5yGsbpYzvrhuchk=";
};
postPatch = ''
patchShebangs .
substituteInPlace src/Makefile.in --replace /bin/echo echo
'';
preConfigure = ''
configureFlagsArray+=("--enable-usbdropdir=$out/pcsc/drivers")
'';
nativeBuildInputs = [ pkg-config perl ];
buildInputs = [ pcsclite libusb1 ];
# The resulting shared object ends up outside of the default paths which are
# usually getting stripped.
stripDebugList = ["pcsc"];
meta = with lib; {
description = "ccid drivers for pcsclite";
homepage = "https://ccid.apdu.fr/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}