sshfs-fuse: 3.7.5 -> 3.7.6 (#526462)

This commit is contained in:
dotlambda
2026-06-01 14:43:13 +00:00
committed by GitHub
2 changed files with 81 additions and 103 deletions
-93
View File
@@ -1,93 +0,0 @@
{
version,
hash,
platforms,
patches ? [ ],
}:
{
lib,
stdenv,
fetchFromGitHub,
meson,
pkg-config,
ninja,
docutils,
makeWrapper,
fuse3,
macfuse-stubs,
glib,
which,
python3Packages,
openssh,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sshfs-fuse";
inherit version;
src = fetchFromGitHub {
owner = "libfuse";
repo = "sshfs";
tag = "sshfs-${finalAttrs.version}";
inherit hash;
};
inherit patches;
nativeBuildInputs = [
meson
pkg-config
ninja
docutils
makeWrapper
];
buildInputs = [
fuse3
glib
];
nativeCheckInputs = [
which
python3Packages.pytest
];
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.system == "i686-linux"
) "-D_FILE_OFFSET_BITS=64";
postInstall = ''
mkdir -p $out/sbin
ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
wrapProgram $out/bin/sshfs --prefix PATH : "${openssh}/bin"
'';
outputs = [
"out"
"man"
];
# doCheck = true;
checkPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# The tests need fusermount:
mkdir bin
cp ${fuse3}/bin/fusermount3 bin/fusermount
export PATH=bin:$PATH
# Can't access /dev/fuse within the sandbox: "FUSE kernel module does not seem to be loaded"
substituteInPlace test/util.py --replace "/dev/fuse" "/dev/null"
# TODO: "fusermount executable not setuid, and we are not root"
# We should probably use a VM test instead
${python3Packages.python.interpreter} -m pytest test/
'';
meta = {
inherit platforms;
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
longDescription = macfuse-stubs.warning;
homepage = "https://github.com/libfuse/sshfs";
license = lib.licenses.gpl2Plus;
mainProgram = "sshfs";
maintainers = [ ];
};
})
+81 -10
View File
@@ -1,14 +1,85 @@
{
lib,
callPackage,
fetchpatch,
stdenv,
fetchFromGitHub,
meson,
pkg-config,
ninja,
docutils,
makeWrapper,
fuse3,
macfuse-stubs,
glib,
which,
python3Packages,
openssh,
}:
let
mkSSHFS = args: callPackage (import ./common.nix args) { };
in
mkSSHFS {
version = "3.7.5";
hash = "sha256-6SFjYYWx+p9tZQ670nbjbPtH/QvCAGCB0YwkaQbKIqA=";
platforms = lib.platforms.darwin ++ lib.platforms.linux;
}
stdenv.mkDerivation (finalAttrs: {
pname = "sshfs-fuse";
version = "3.7.6";
src = fetchFromGitHub {
owner = "libfuse";
repo = "sshfs";
tag = "sshfs-${finalAttrs.version}";
hash = "sha256-BT9qttXyryliR2kV1xVYvcwJhB6gkGf7IEwrTB38SvI=";
};
nativeBuildInputs = [
meson
pkg-config
ninja
docutils
makeWrapper
];
buildInputs = [
fuse3
glib
];
nativeCheckInputs = [
which
python3Packages.pytest
];
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.system == "i686-linux"
) "-D_FILE_OFFSET_BITS=64";
postInstall = ''
mkdir -p $out/sbin
ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
wrapProgram $out/bin/sshfs --prefix PATH : "${openssh}/bin"
'';
outputs = [
"out"
"man"
];
# doCheck = true;
checkPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# The tests need fusermount:
mkdir bin
cp ${fuse3}/bin/fusermount3 bin/fusermount
export PATH=bin:$PATH
# Can't access /dev/fuse within the sandbox: "FUSE kernel module does not seem to be loaded"
substituteInPlace test/util.py --replace "/dev/fuse" "/dev/null"
# TODO: "fusermount executable not setuid, and we are not root"
# We should probably use a VM test instead
${python3Packages.python.interpreter} -m pytest test/
'';
meta = {
changelog = "https://github.com/libfuse/sshfs/blob/${finalAttrs.src.tag}/ChangeLog.rst";
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
longDescription = macfuse-stubs.warning;
homepage = "https://github.com/libfuse/sshfs";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.darwin ++ lib.platforms.linux;
mainProgram = "sshfs";
maintainers = [ ];
};
})