chore: use global pcsclite workaround

This commit is contained in:
oddlama 2024-05-13 22:38:33 +02:00
parent f4699c9663
commit f8bb0d071c
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 14 additions and 16 deletions

View file

@ -1,25 +1,9 @@
{
lib,
nixosConfig,
pkgs,
...
}: {
programs.gpg = {
/*
low impact workaround to integrate the fix not yet merged to nixos-unstable, see:
- https://discourse.nixos.org/t/gpg-selecting-card-failed-service-is-not-running/44974/12
- https://github.com/NixOS/nixpkgs/pull/308884
*/
package = pkgs.gnupg.override {
pcsclite = pkgs.pcsclite.overrideAttrs (old: {
postPatch =
old.postPatch
+ (lib.optionalString (!(lib.strings.hasInfix ''--replace-fail "libpcsclite_real.so.1"'' old.postPatch)) ''
substituteInPlace src/libredirect.c src/spy/libpcscspy.c \
--replace-fail "libpcsclite_real.so.1" "$lib/lib/libpcsclite_real.so.1"
'');
});
};
enable = true;
scdaemonSettings.disable-ccid = true;
publicKeys = [