2020-04-08 21:23:38 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libusb1, pcsclite }:
|
2016-06-04 12:48:18 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pcsc-cyberjack";
|
2018-09-27 04:13:59 +02:00
|
|
|
version = "3.99.5_SP12";
|
2016-06-04 12:48:18 +02:00
|
|
|
|
|
|
|
src = with stdenv.lib; let
|
|
|
|
splittedVer = splitString "_" version;
|
|
|
|
mainVer = if length splittedVer >= 1 then head splittedVer else version;
|
|
|
|
spVer = optionalString (length splittedVer >= 1) ("." + last splittedVer);
|
|
|
|
tarballVersion = "${mainVer}final${spVer}";
|
|
|
|
in fetchurl {
|
|
|
|
url = "http://support.reiner-sct.de/downloads/LINUX/V${version}"
|
|
|
|
+ "/pcsc-cyberjack-${tarballVersion}.tar.bz2";
|
2018-09-27 04:13:59 +02:00
|
|
|
sha256 = "04pkmybal56s5xnjld09vl1s1h6qf8mvhm41b758d6hi240kgp1j";
|
2016-06-04 12:48:18 +02:00
|
|
|
};
|
|
|
|
|
2018-09-27 04:17:24 +02:00
|
|
|
outputs = [ "out" "tools" ];
|
|
|
|
|
2016-06-04 12:48:18 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2020-04-08 21:23:38 +02:00
|
|
|
buildInputs = [ libusb1 pcsclite ];
|
2016-06-04 12:48:18 +02:00
|
|
|
|
2018-09-27 04:17:24 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-usbdropdir=${placeholder "out"}/pcsc/drivers"
|
|
|
|
"--bindir=${placeholder "tools"}/bin"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = "make -C tools/cjflash install";
|
2016-06-04 12:48:18 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "REINER SCT cyberJack USB chipcard reader user space driver";
|
2018-06-23 13:34:55 +02:00
|
|
|
homepage = https://www.reiner-sct.com/;
|
2016-06-04 12:48:18 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ aszlig ];
|
|
|
|
};
|
|
|
|
}
|