2020-04-28 05:29:39 +02:00
|
|
|
{ stdenv, fetchurl, unzip, libusb-compat-0_1 }:
|
2018-04-09 06:01:55 +02:00
|
|
|
|
|
|
|
let
|
2018-08-20 21:11:29 +02:00
|
|
|
arch = if stdenv.hostPlatform.system == "i686-linux" then "32"
|
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then "64"
|
|
|
|
else throw "Unsupported system: ${stdenv.hostPlatform.system}";
|
2018-04-09 06:01:55 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pcsc-scm-scl";
|
2018-04-09 06:01:55 +02:00
|
|
|
version = "2.09";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://files.identiv.com/products/smart-card-readers/contactless/scl010-011/Linux_Driver_Ver${version}.zip";
|
|
|
|
sha256 = "0ik26sxgqgsqplksl87z61vwmx51k7plaqmrkdid7xidgfhfxr42";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src
|
|
|
|
tar xf "Linux Driver Ver${version}/sclgeneric_${version}_linux_${arch}bit.tar.gz"
|
2018-04-30 13:15:25 +02:00
|
|
|
export sourceRoot=$(readlink -e sclgeneric_${version}_linux_${arch}bit)
|
2018-04-09 06:01:55 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Add support for SCL011 nPA (subsidized model for German eID)
|
|
|
|
patches = [ ./eid.patch ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/pcsc/drivers
|
|
|
|
cp -r proprietary/*.bundle $out/pcsc/drivers
|
|
|
|
'';
|
|
|
|
|
2020-04-28 05:29:39 +02:00
|
|
|
libPath = stdenv.lib.makeLibraryPath [ libusb-compat-0_1 ];
|
2018-04-09 06:01:55 +02:00
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
patchelf --set-rpath $libPath \
|
|
|
|
$out/pcsc/drivers/SCLGENERIC.bundle/Contents/Linux/libSCLGENERIC.so.${version};
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SCM Microsystems SCL011 chipcard reader user space driver";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.scm-pc-card.de/index.php?lang=en&page=product&function=show_product&product_id=630";
|
|
|
|
downloadPage = "https://support.identiv.com/scl010-scl011/";
|
2018-04-09 06:01:55 +02:00
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
maintainers = with maintainers; [ sephalon ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|