anchor.diff:            firefox.override { pkcs11Modules = [ pkgs.eid-mw ]; }
       '';
       platforms = platforms.linux;
  -    maintainers = with maintainers; [ bfortz ];
  +    maintainers = with maintainers; [ bfortz chvp ];
     };
   }
  
positive.code: { lib, stdenv, fetchFromGitHub
  , autoreconfHook, pkg-config
  , gtk3, nssTools, pcsclite
  , libxml2, libproxy
  , openssl, curl
  , makeWrapper
  , substituteAll }:
  
  stdenv.mkDerivation rec {
    pname = "eid-mw";
    version = "4.4.27";
  
    src = fetchFromGitHub {
      rev = "v${version}";
      sha256 = "17lw8iwp7h5cs3db80sysr84ffi333cf2vrhncs9l6hy6glfl2v1";
      repo = "eid-mw";
      owner = "Fedict";
    };
  
    nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
    buildInputs = [ gtk3 pcsclite libxml2 libproxy curl openssl ];
    preConfigure = ''
      mkdir openssl
      ln -s ${openssl.out}/lib openssl
  
negative.code:     export SSL_PREFIX=$(realpath openssl)
      substituteInPlace plugins_tools/eid-viewer/Makefile.in \
        --replace "c_rehash" "openssl rehash"
    '';
    # pinentry uses hardcoded `/usr/bin/pinentry`, so use the built-in (uglier) dialogs for pinentry.
    configureFlags = [ "--disable-pinentry" ];
  
    postPatch = ''
      sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac
    '';
  
    postInstall =
      let
        eid-nssdb-in = substituteAll {
          inherit (stdenv) shell;
          isExecutable = true;
          src = ./eid-nssdb.in;
        };
      in
      ''
        install -D ${eid-nssdb-in} $out/bin/eid-nssdb
        substituteInPlace $out/bin/eid-nssdb \
          --replace "modutil" "${nssTools}/bin/modutil"
  
        rm $out/bin/about-eid-mw
        wrapProgram $out/bin/eid-viewer --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/$name"
      '';
  
    enableParallelBuilding = true;
  
  