gvfs: support cross compilation

This commit is contained in:
Colin 2023-10-24 16:03:57 +00:00
parent 5655c7f0be
commit 909df81605
2 changed files with 18 additions and 8 deletions

View File

@ -5,6 +5,7 @@
, meson
, ninja
, pkg-config
, substituteAll
, gettext
, dbus
, glib
@ -53,12 +54,9 @@ stdenv.mkDerivation rec {
};
patches = [
# Hardcode the ssh path again.
# https://gitlab.gnome.org/GNOME/gvfs/-/issues/465
(fetchpatch2 {
url = "https://gitlab.gnome.org/GNOME/gvfs/-/commit/8327383e262e1e7f32750a8a2d3dd708195b0f53.patch";
hash = "sha256-ReD7qkezGeiJHyo9jTqEQNBjECqGhV9nSD+dYYGZWJ8=";
revert = true;
(substituteAll {
src = ./hardcode-ssh-path.patch;
ssh_program = "${lib.getBin openssh}/bin/ssh";
})
];
@ -76,7 +74,6 @@ stdenv.mkDerivation rec {
pkg-config
gettext
wrapGAppsHook
libxml2
libxslt
docbook_xsl
docbook_xml_dtd_42
@ -92,7 +89,7 @@ stdenv.mkDerivation rec {
libimobiledevice
libbluray
libnfs
openssh
libxml2
gsettings-desktop-schemas
libsoup_3
] ++ lib.optionals udevSupport [

View File

@ -0,0 +1,13 @@
diff --git a/daemon/meson.build b/daemon/meson.build
index 72a16890..718944e1 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -256,7 +256,7 @@ if enable_sftp
'-DDEFAULT_BACKEND_TYPE=sftp',
'-DBACKEND_TYPES="sftp", G_VFS_TYPE_BACKEND_SFTP,',
'-DMAX_JOB_THREADS=1',
- '-DSSH_PROGRAM="ssh"',
+ '-DSSH_PROGRAM="@ssh_program@"',
]
programs += {'gvfsd-sftp': {'sources': sources, 'dependencies': deps, 'c_args': cflags}}