nixpkgs/pkgs/tools/security/pcsctools/default.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

2015-11-13 13:24:03 +01:00
{ stdenv, lib, fetchurl, makeWrapper, pkgconfig, udev, dbus_libs, pcsclite
, wget, coreutils
, perl, pcscperl, Glib, Gtk2, Pango
}:
2015-03-09 11:50:44 +01:00
let deps = lib.makeBinPath [ wget coreutils ];
2015-11-13 13:24:03 +01:00
in stdenv.mkDerivation rec {
name = "pcsc-tools-1.4.25";
2015-03-09 11:50:44 +01:00
src = fetchurl {
2015-11-13 13:24:03 +01:00
url = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/${name}.tar.gz";
sha256 = "0iqcy28pb963ds4pjrpi37577vm6nkgf3i0b3rr978jy9qi1bix9";
2015-03-09 11:50:44 +01:00
};
buildInputs = [ udev dbus_libs perl pcsclite ];
2015-11-13 13:24:03 +01:00
makeFlags = [ "DESTDIR=$(out)" ];
2015-03-09 11:50:44 +01:00
2015-11-13 13:24:03 +01:00
nativeBuildInputs = [ makeWrapper pkgconfig ];
postInstall = ''
wrapProgram $out/bin/scriptor \
--set PERL5LIB "${lib.makePerlPath [ pcscperl ]}"
wrapProgram $out/bin/gscriptor \
--set PERL5LIB "${lib.makePerlPath [ pcscperl Glib Gtk2 Pango ]}"
wrapProgram $out/bin/ATR_analysis \
--set PERL5LIB "${lib.makePerlPath [ pcscperl ]}"
wrapProgram $out/bin/pcsc_scan \
--set PATH "$out/bin:${deps}"
'';
2015-03-09 11:50:44 +01:00
2015-11-13 13:24:03 +01:00
meta = with lib; {
2015-03-09 11:50:44 +01:00
description = "Tools used to test a PC/SC driver, card or reader";
homepage = http://ludovic.rousseau.free.fr/softwares/pcsc-tools/;
2015-03-09 16:01:10 +01:00
license = licenses.gpl2Plus;
2015-03-09 11:50:44 +01:00
maintainers = with maintainers; [ viric ];
platforms = platforms.linux;
2015-03-09 11:50:44 +01:00
};
}