From b134cce4072156711f67bf8e10239dc37b9eb051 Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Thu, 1 Feb 2024 11:57:14 +0100 Subject: [PATCH] vsmartcard-pcsc-relay: init at 20220814 --- .../vs/vsmartcard-pcsc-relay/package.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix diff --git a/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix b/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix new file mode 100644 index 0000000000000..31e053265f2ff --- /dev/null +++ b/pkgs/by-name/vs/vsmartcard-pcsc-relay/package.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, libtool +, autoreconfHook +, pcsclite, PCSC +, libnfc +, python3 +, help2man +, gengetopt +}: + +stdenv.mkDerivation rec { + pname = "vsmartcard-pcsc-relay"; + version = "20220814"; + + src = fetchFromGitHub { + owner = "frankmorgner"; + repo = "vsmartcard"; + rev = "8b4aa3e7bfe891d986237759576b5ebf0e4ed42b"; + sha256 = "sha256-o01ASvHa68++wrHPLYxd452kHM0EAYQuMX8sbGjvvsg="; + }; + + sourceRoot = "source/pcsc-relay"; + + nativeBuildInputs = [ + autoreconfHook + libtool + pkg-config + help2man + ]; + + buildInputs = [ + pcsclite + libnfc + gengetopt + (python3.withPackages (pp: with pp; [ + pyscard + pycrypto + pbkdf2 + pillow + gnureadline + ])) + ] ++ lib.optionals stdenv.isDarwin [ PCSC ]; + + meta = with lib; { + description = "Relays a smart card using an contact-less interface"; + homepage = "https://frankmorgner.github.io/vsmartcard/pcsc-relay/README.html"; + license = licenses.gpl3; + platforms = platforms.all; + maintainers = with maintainers; [ stargate01 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2609ea15c9101..9aee20522a60e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14447,6 +14447,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) PCSC; }; + vsmartcard-pcsc-relay = callPackage ../by-name/vs/vsmartcard-pcsc-relay/package.nix { + inherit (darwin.apple_sdk.frameworks) PCSC; + }; vtm = callPackage ../tools/misc/vtm { };