Unverified Commit c69a7311 authored by Anthony Rodriguez's avatar Anthony Rodriguez
Browse files

gcr_4: build with ssh-agent

This builds `gcr_4` with ssh-agent, in order to move away from
`gnome-keyring-daemon`, which was [deprecated in 1.46.0](https://gitlab.gnome.org/GNOME/gnome-keyring/-/commit/25c5a1982467802fa12c6852b03c57924553ba73

).

Co-authored-by: default avatarlilyinstarlight <lily@lily.flowers>
parent f416162e
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
{
  pkgs,
  stdenv,
  lib,
  fetchurl,
@@ -25,7 +26,9 @@
  shared-mime-info,
  systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
}:

let
  ini = pkgs.formats.ini { };
in
stdenv.mkDerivation (finalAttrs: {
  pname = "gcr";
  version = "4.4.0.1";
@@ -80,11 +83,20 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  mesonFlags = [
    # We are still using ssh-agent from gnome-keyring.
    # https://github.com/NixOS/nixpkgs/issues/140824
    "-Dssh_agent=false"
    "-Dgpg_path=${lib.getBin gnupg}/bin/gpg"
    (lib.mesonEnable "systemd" systemdSupport)
    "--cross-file=${
      ini.generate "cross-file.conf" {
        binaries =
          {
            ssh-add = "'${lib.getExe' openssh "ssh-add"}'";
            ssh-agent = "'${lib.getExe' openssh "ssh-agent"}'";
          }
          // lib.optionalAttrs systemdSupport {
            systemctl = "'${lib.getExe' systemd "systemctl"}'";
          };
      }
    }"
  ];

  doCheck = false; # fails 21 out of 603 tests, needs dbus daemon