From e6d5d5d44f03cfd3ca37a9a9a12a6fe6a30b14a5 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 26 Dec 2023 19:04:27 -0500 Subject: [PATCH] pcsclite: disable building pcsc-wirecheck{,-gen} when cross compiling --- pkgs/tools/security/pcsclite/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index 08a4b5b08d02..386fa01275ca 100644 --- a/pkgs/tools/security/pcsclite/default.nix +++ b/pkgs/tools/security/pcsclite/default.nix @@ -46,6 +46,14 @@ stdenv.mkDerivation (finalAttrs: { "POLICY_DIR=$(out)/share/polkit-1/actions" ]; + # disable building pcsc-wirecheck{,-gen} when cross compiling + # see also: https://github.com/LudovicRousseau/PCSC/issues/25 + postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + substituteInPlace src/Makefile.am \ + --replace "noinst_PROGRAMS = testpcsc pcsc-wirecheck pcsc-wirecheck-gen" \ + "noinst_PROGRAMS = testpcsc" + ''; + postInstall = '' # pcsc-spy is a debugging utility and it drags python into the closure moveToOutput bin/pcsc-spy "$dev"