mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
pcsclite: fix pcsc-spy interpreter
Patch pcsc-spy with the host Python after moving it to dev. The automatic dev-output hook uses the build path, leaving /usr/bin/python3 unchanged with strictDeps. Add an execution test for pcsc-spy --help. Fixes #557676 Assisted-by: Codex (GPT-6 Astra)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
pname ? "pcsclite",
|
||||
polkitSupport ? false,
|
||||
nixosTests,
|
||||
runCommand,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -86,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
postInstall = ''
|
||||
# pcsc-spy is a debugging utility and it drags python into the closure
|
||||
moveToOutput bin/pcsc-spy "$dev"
|
||||
patchShebangs --host "$dev/bin/pcsc-spy"
|
||||
'';
|
||||
|
||||
__structuredAttrs = true;
|
||||
@@ -117,6 +119,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
package = finalAttrs.finalPackage;
|
||||
command = "pcscd --version";
|
||||
};
|
||||
pcsc-spy = runCommand "pcsc-spy-test" { } ''
|
||||
status=0
|
||||
${finalAttrs.finalPackage.dev}/bin/pcsc-spy --help > help.txt 2>&1 || status=$?
|
||||
test "$status" -eq 1
|
||||
grep -F "Usage: pcsc-spy" help.txt
|
||||
touch "$out"
|
||||
'';
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user