Merge pull request #277003 from NickCao/pcsc

pcsclite: disable building pcsc-wirecheck{,-gen} when cross compiling
This commit is contained in:
Rick van Schijndel
2024-01-19 08:07:30 +01:00
committed by GitHub

View File

@@ -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"