diff --git a/pkgs/development/libraries/gcr/4.nix b/pkgs/development/libraries/gcr/4.nix index 33e85811a8f8..34a0e67a3e3a 100644 --- a/pkgs/development/libraries/gcr/4.nix +++ b/pkgs/development/libraries/gcr/4.nix @@ -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