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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchurl
, makeWrapper
, pkg-config
, systemd
, dbus
, pcsclite
, wget
, coreutils
, perlPackages
2015-11-13 12:24:03 +00:00
}:
2015-03-09 10:50:44 +00:00
stdenv.mkDerivation rec {
pname = "pcsc-tools";
2022-02-12 23:39:25 +00:00
version = "1.6.0";
2015-03-09 10:50:44 +00:00
src = fetchurl {
url = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/${pname}-${version}.tar.bz2";
2022-02-12 23:39:25 +00:00
sha256 = "sha256-ZRyN10vLM9tMFpNc5dgN0apusgup1cS5YxoJgybvi58=";
2015-03-09 10:50:44 +00:00
};
postPatch = ''
substituteInPlace ATR_analysis \
--replace /usr/local/pcsc /etc/pcsc \
--replace /usr/share/pcsc $out/share/pcsc
'';
buildInputs = [ dbus perlPackages.perl pcsclite ]
++ lib.optional stdenv.isLinux systemd;
2015-03-09 10:50:44 +00:00
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ makeWrapper pkg-config ];
2015-11-13 12:24:03 +00:00
postInstall = ''
wrapProgram $out/bin/scriptor \
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl ]}"
2015-11-13 12:24:03 +00:00
wrapProgram $out/bin/gscriptor \
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl GlibObjectIntrospection Glib Gtk3 Pango Cairo CairoGObject ]}"
2015-11-13 12:24:03 +00:00
wrapProgram $out/bin/ATR_analysis \
--set PERL5LIB "${with perlPackages; makePerlPath [ pcscperl ]}"
2015-11-13 12:24:03 +00:00
wrapProgram $out/bin/pcsc_scan \
--prefix PATH : "$out/bin:${lib.makeBinPath [ coreutils wget ]}"
install -Dm444 -t $out/share/pcsc smartcard_list.txt
2015-11-13 12:24:03 +00:00
'';
2015-03-09 10:50:44 +00:00
2015-11-13 12:24:03 +00:00
meta = with lib; {
2015-03-09 10:50:44 +00:00
description = "Tools used to test a PC/SC driver, card or reader";
2020-03-11 10:48:17 +00:00
homepage = "http://ludovic.rousseau.free.fr/softwares/pcsc-tools/";
2015-03-09 15:01:10 +00:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
2015-03-09 10:50:44 +00:00
};
}