nixpkgs/pkgs/tools/security/ccid/default.nix
2021-01-16 23:49:59 -08:00

31 lines
757 B
Nix

{ lib, stdenv, fetchurl, pcsclite, pkg-config, libusb1, perl }:
stdenv.mkDerivation rec {
pname = "ccid";
version = "1.4.33";
src = fetchurl {
url = "https://ccid.apdu.fr/files/${pname}-${version}.tar.bz2";
sha256 = "0974h2v9wq0j0ajw3c7yckaw8wqcppb2npfhfhmv9phijy9xlmjj";
};
postPatch = ''
patchShebangs .
substituteInPlace src/Makefile.in --replace /bin/echo echo
'';
preConfigure = ''
configureFlagsArray+=("--enable-usbdropdir=$out/pcsc/drivers")
'';
nativeBuildInputs = [ pkg-config perl ];
buildInputs = [ pcsclite libusb1 ];
meta = with lib; {
description = "ccid drivers for pcsclite";
homepage = "https://ccid.apdu.fr/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}