Skip to content

Commit

Permalink
Merge pull request #272745 from anthonyroussel/updates/pcsctools
Browse files Browse the repository at this point in the history
pcsc-tools: 1.6.2 -> 1.7.0
  • Loading branch information
marsam authored Dec 18, 2023
2 parents a5873fa + 848b539 commit 2147020
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 59 deletions.
96 changes: 96 additions & 0 deletions pkgs/tools/security/pcsc-tools/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
})
57 changes: 0 additions & 57 deletions pkgs/tools/security/pcsctools/default.nix

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit 2147020

Please sign in to comment.