2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, pkg-config, udev, dbus, pcsclite
|
2020-04-24 23:36:52 +00:00
|
|
|
, wget, coreutils, perlPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
let deps = lib.makeBinPath [ wget coreutils ];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-07-18 16:06:22 +00:00
|
|
|
name = "pcsc-tools-1.5.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/${name}.tar.bz2";
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "17b9jxvcxmn007lavan20l25v4jvm6dqc4x9dlqzbg6mjs28zsp0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ udev dbus perlPackages.perl pcsclite ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/scriptor \
|
|
|
|
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl ]}"
|
|
|
|
wrapProgram $out/bin/gscriptor \
|
2020-07-18 16:06:22 +00:00
|
|
|
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl GlibObjectIntrospection Glib Gtk3 Pango Cairo CairoGObject ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/ATR_analysis \
|
|
|
|
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl ]}"
|
|
|
|
wrapProgram $out/bin/pcsc_scan \
|
|
|
|
--set PATH "$out/bin:${deps}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tools used to test a PC/SC driver, card or reader";
|
|
|
|
homepage = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|