forked from mirrors/nixpkgs
a70d3bab72
This tool is necessary in order to update the firmware of the secoder. The reason I've added this to a separate output "tools" is because it clearly is not relevant for the PCSC driver itself and it's also very rarely needed. I've also verified wether the closure of the PCSC plugin env still only contains the main output and that's the case. There are also other tools - cjBingoTest and cjgeldkarte, where the former doesn't compile due to cjeca32.h not being found and cjgeldkarte, which does compile but tries to dlopen() the library and subsequently fails. Both of these tools however look like they're just performing tests and are not very useful outside of development, so I opted to not include them. Signed-off-by: aszlig <aszlig@nix.build>
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ stdenv, fetchurl, pkgconfig, libusb, pcsclite }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "pcsc-cyberjack-${version}";
|
|
version = "3.99.5_SP12";
|
|
|
|
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";
|
|
sha256 = "04pkmybal56s5xnjld09vl1s1h6qf8mvhm41b758d6hi240kgp1j";
|
|
};
|
|
|
|
outputs = [ "out" "tools" ];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [ libusb pcsclite ];
|
|
|
|
configureFlags = [
|
|
"--with-usbdropdir=${placeholder "out"}/pcsc/drivers"
|
|
"--bindir=${placeholder "tools"}/bin"
|
|
];
|
|
|
|
postInstall = "make -C tools/cjflash install";
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "REINER SCT cyberJack USB chipcard reader user space driver";
|
|
homepage = https://www.reiner-sct.com/;
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ aszlig ];
|
|
};
|
|
}
|