mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 11:53:51 +00:00
Merge pull request #272745 from anthonyroussel/updates/pcsctools
pcsc-tools: 1.6.2 -> 1.7.0
This commit is contained in:
commit
2147020452
96
pkgs/tools/security/pcsc-tools/default.nix
Normal file
96
pkgs/tools/security/pcsc-tools/default.nix
Normal file
@ -0,0 +1,96 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, autoconf-archive
|
||||
, autoreconfHook
|
||||
, gobject-introspection
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, systemd
|
||||
, dbus
|
||||
, pcsclite
|
||||
, PCSC
|
||||
, wget
|
||||
, coreutils
|
||||
, perlPackages
|
||||
, testers
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pcsc-tools";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LudovicRousseau";
|
||||
repo = "pcsc-tools";
|
||||
rev = "refs/tags/${finalAttrs.version}";
|
||||
hash = "sha256-tTeSlS1ncpdIaoJsSVgm3zSCogP6S8zlA9hRFocZ/R4=";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--datarootdir=${placeholder "out"}/share"
|
||||
];
|
||||
|
||||
buildInputs = [ dbus perlPackages.perl pcsclite ]
|
||||
++ lib.optional stdenv.isDarwin PCSC
|
||||
++ lib.optional stdenv.isLinux systemd;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf-archive
|
||||
autoreconfHook
|
||||
gobject-introspection
|
||||
makeWrapper
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/scriptor \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ ChipcardPCSC libintl-perl ]}"
|
||||
|
||||
wrapProgram $out/bin/gscriptor \
|
||||
''${makeWrapperArgs[@]} \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [
|
||||
ChipcardPCSC
|
||||
libintl-perl
|
||||
GlibObjectIntrospection
|
||||
Glib
|
||||
Gtk3
|
||||
Pango
|
||||
Cairo
|
||||
CairoGObject
|
||||
]}"
|
||||
|
||||
wrapProgram $out/bin/ATR_analysis \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ ChipcardPCSC libintl-perl ]}"
|
||||
|
||||
wrapProgram $out/bin/pcsc_scan \
|
||||
--prefix PATH : "$out/bin:${lib.makeBinPath [ coreutils wget ]}"
|
||||
|
||||
install -Dm444 -t $out/share/pcsc smartcard_list.txt
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = finalAttrs.finalPackage;
|
||||
command = "pcsc_scan -V";
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools used to test a PC/SC driver, card or reader";
|
||||
homepage = "https://pcsc-tools.apdu.fr/";
|
||||
changelog = "https://github.com/LudovicRousseau/pcsc-tools/releases/tag/${finalAttrs.version}";
|
||||
license = licenses.gpl2Plus;
|
||||
mainProgram = "pcsc_scan";
|
||||
maintainers = with maintainers; [ peterhoeg anthonyroussel ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
})
|
@ -1,57 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, systemd
|
||||
, dbus
|
||||
, pcsclite
|
||||
, wget
|
||||
, coreutils
|
||||
, perlPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pcsc-tools";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LudovicRousseau";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-c7md8m1llvz0EQqA0qY4aGb3guGFoj+8uS4hUTzie5o=";
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/scriptor \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ ChipcardPCSC ]}"
|
||||
wrapProgram $out/bin/gscriptor \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ ChipcardPCSC GlibObjectIntrospection Glib Gtk3 Pango Cairo CairoGObject ]}"
|
||||
wrapProgram $out/bin/ATR_analysis \
|
||||
--set PERL5LIB "${with perlPackages; makePerlPath [ ChipcardPCSC ]}"
|
||||
wrapProgram $out/bin/pcsc_scan \
|
||||
--prefix PATH : "$out/bin:${lib.makeBinPath [ coreutils wget ]}"
|
||||
|
||||
install -Dm444 -t $out/share/pcsc smartcard_list.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools used to test a PC/SC driver, card or reader";
|
||||
homepage = "https://pcsc-tools.apdu.fr/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -703,6 +703,7 @@ mapAliases ({
|
||||
paper-note = throw "paper-note has been removed: abandoned by upstream"; # Added 2023-05-03
|
||||
parity = openethereum; # Added 2020-08-01
|
||||
pash = throw "'pash' has been removed: abandoned by upstream. Use 'powershell' instead"; # Added 2023-09-16
|
||||
pcsctools = pcsc-tools; # Added 2023-12-07
|
||||
pdf2xml = throw "'pdf2xml' was removed: abandoned for years."; # Added 2023-10-22
|
||||
peach = asouldocs; # Added 2022-08-28
|
||||
pentablet-driver = xp-pen-g430-driver; # Added 2022-06-23
|
||||
|
@ -11977,13 +11977,16 @@ with pkgs;
|
||||
polkitSupport = true;
|
||||
};
|
||||
|
||||
pcsctools = callPackage ../tools/security/pcsctools { };
|
||||
|
||||
pcsc-cyberjack = callPackage ../tools/security/pcsc-cyberjack { };
|
||||
|
||||
pcsc-safenet = callPackage ../tools/security/pcsc-safenet { };
|
||||
|
||||
pcsc-scm-scl011 = callPackage ../tools/security/pcsc-scm-scl011 { };
|
||||
|
||||
pcsc-tools = callPackage ../tools/security/pcsc-tools {
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) PCSC;
|
||||
};
|
||||
|
||||
ifdnfc = callPackage ../tools/security/ifdnfc { };
|
||||
|
||||
pdd = python3Packages.callPackage ../tools/misc/pdd { };
|
||||
|
Loading…
Reference in New Issue
Block a user