From a674cc38b95b964efc6c65073ae949e70ee0030f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 31 May 2026 12:09:12 -0700 Subject: [PATCH 1/2] sshfs-fuse: remove common.nix --- pkgs/by-name/ss/sshfs-fuse/common.nix | 93 -------------------------- pkgs/by-name/ss/sshfs-fuse/package.nix | 88 +++++++++++++++++++++--- 2 files changed, 79 insertions(+), 102 deletions(-) delete mode 100644 pkgs/by-name/ss/sshfs-fuse/common.nix diff --git a/pkgs/by-name/ss/sshfs-fuse/common.nix b/pkgs/by-name/ss/sshfs-fuse/common.nix deleted file mode 100644 index ca4b1b111897..000000000000 --- a/pkgs/by-name/ss/sshfs-fuse/common.nix +++ /dev/null @@ -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 = [ ]; - }; -}) diff --git a/pkgs/by-name/ss/sshfs-fuse/package.nix b/pkgs/by-name/ss/sshfs-fuse/package.nix index 54c2dab96c8e..f5cf61c613f2 100644 --- a/pkgs/by-name/ss/sshfs-fuse/package.nix +++ b/pkgs/by-name/ss/sshfs-fuse/package.nix @@ -1,14 +1,84 @@ { 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 { +stdenv.mkDerivation (finalAttrs: { + pname = "sshfs-fuse"; version = "3.7.5"; - hash = "sha256-6SFjYYWx+p9tZQ670nbjbPtH/QvCAGCB0YwkaQbKIqA="; - platforms = lib.platforms.darwin ++ lib.platforms.linux; -} + + src = fetchFromGitHub { + owner = "libfuse"; + repo = "sshfs"; + tag = "sshfs-${finalAttrs.version}"; + hash = "sha256-6SFjYYWx+p9tZQ670nbjbPtH/QvCAGCB0YwkaQbKIqA="; + }; + + 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 = { + 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 = [ ]; + }; +}) From 35e60c722fe4514311566b30cb5c3251d81dbde8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 31 May 2026 12:11:38 -0700 Subject: [PATCH 2/2] sshfs-fuse: 3.7.5 -> 3.7.6 Diff: https://github.com/libfuse/sshfs/compare/sshfs-3.7.5...sshfs-3.7.6 Changelog: https://github.com/libfuse/sshfs/blob/sshfs-3.7.6/ChangeLog.rst --- pkgs/by-name/ss/sshfs-fuse/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ss/sshfs-fuse/package.nix b/pkgs/by-name/ss/sshfs-fuse/package.nix index f5cf61c613f2..974d3d3ebcd4 100644 --- a/pkgs/by-name/ss/sshfs-fuse/package.nix +++ b/pkgs/by-name/ss/sshfs-fuse/package.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "sshfs-fuse"; - version = "3.7.5"; + version = "3.7.6"; src = fetchFromGitHub { owner = "libfuse"; repo = "sshfs"; tag = "sshfs-${finalAttrs.version}"; - hash = "sha256-6SFjYYWx+p9tZQ670nbjbPtH/QvCAGCB0YwkaQbKIqA="; + hash = "sha256-BT9qttXyryliR2kV1xVYvcwJhB6gkGf7IEwrTB38SvI="; }; nativeBuildInputs = [ @@ -73,6 +73,7 @@ stdenv.mkDerivation (finalAttrs: { ''; 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";