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: lilyinstarlight <lily@lily.flowers>
This commit is contained in:
Anthony Rodriguez
2025-06-03 21:59:14 +02:00
co-authored by lilyinstarlight
parent f416162e75
commit c69a7311f6
+16 -4
View File
@@ -1,4 +1,5 @@
{
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