Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libusb1, pcsclite }:
2
3let
4 version = "3.99.5";
5 suffix = "SP13";
6 tarBall = "${version}final.${suffix}";
7
8in stdenv.mkDerivation rec {
9 pname = "pcsc-cyberjack";
10 inherit version;
11
12 src = fetchurl {
13 url =
14 "http://support.reiner-sct.de/downloads/LINUX/V${version}_${suffix}/${pname}_${tarBall}.tar.gz";
15 sha256 = "1lx4bfz4riz7j77sl65akyxzww0ygm63w0c1b75knr1pijlv8d3b";
16 };
17
18 outputs = [ "out" "tools" ];
19
20 nativeBuildInputs = [ autoreconfHook pkg-config ];
21
22 buildInputs = [ libusb1 pcsclite ];
23
24 enableParallelBuilding = true;
25
26 env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing";
27
28 configureFlags = [
29 "--with-usbdropdir=${placeholder "out"}/pcsc/drivers"
30 "--bindir=${placeholder "tools"}/bin"
31 ];
32
33 postInstall = "make -C tools/cjflash install";
34
35 meta = with lib; {
36 description = "REINER SCT cyberJack USB chipcard reader user space driver";
37 homepage = "https://www.reiner-sct.com/";
38 license = licenses.gpl2Plus;
39 maintainers = with maintainers; [ aszlig ];
40 platforms = platforms.linux;
41 };
42}