fix: add temporary fix for gpg<->pcscd internal issue

This commit is contained in:
oddlama 2024-05-08 13:27:46 +02:00
parent a69f4577f0
commit 7b4d55ca80
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -1,9 +1,25 @@
{ {
lib,
nixosConfig, nixosConfig,
pkgs, pkgs,
... ...
}: { }: {
programs.gpg = { 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; enable = true;
scdaemonSettings.disable-ccid = true; scdaemonSettings.disable-ccid = true;
publicKeys = [ publicKeys = [