From 2dd01df27a3da4b155469c96d019f5fdda885615 Mon Sep 17 00:00:00 2001 From: Anthony ROUSSEL Date: Fri, 25 Jul 2025 00:10:49 +0200 Subject: [PATCH] ccid: fix installCheckPhase on darwin --- pkgs/by-name/cc/ccid/package.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/cc/ccid/package.nix b/pkgs/by-name/cc/ccid/package.nix index f46499111ae3..b0a6702a1cd0 100644 --- a/pkgs/by-name/cc/ccid/package.nix +++ b/pkgs/by-name/cc/ccid/package.nix @@ -69,17 +69,21 @@ stdenv.mkDerivation rec { url = "https://salsa.debian.org/rousseau/CCID.git"; }; - installCheckPhase = '' - runHook preInstallCheck + installCheckPhase = + let + platform = if stdenv.hostPlatform.isLinux then "Linux" else "MacOS"; + in + lib.optionalString (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) '' + runHook preInstallCheck - [ -f $out/etc/reader.conf.d/libccidtwin ] - [ -f $out/lib/udev/rules.d/92_pcscd_ccid.rules ] - [ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist ] - [ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so ] - [ -f $out/pcsc/drivers/serial/libccidtwin.so ] + [ -f $out/etc/reader.conf.d/libccidtwin ] + [ -f $out/lib/udev/rules.d/92_pcscd_ccid.rules ] + [ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist ] + [ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/${platform}/libccid${stdenv.hostPlatform.extensions.sharedLibrary} ] + [ -f $out/pcsc/drivers/serial/libccidtwin${stdenv.hostPlatform.extensions.sharedLibrary} ] - runHook preInstallCheck - ''; + runHook postInstallCheck + ''; meta = with lib; { description = "PC/SC driver for USB CCID smart card readers";