Commit e632fa93 authored by Weijia Wang's avatar Weijia Wang
Browse files

sshfs-fuse: {2.10, 3.7.3} -> 3.7.5

parent e5f718f2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
{
  version,
  sha256,
  hash,
  platforms,
  patches ? [ ],
}:
@@ -23,7 +23,7 @@
}:

let
  fuse = if stdenv.hostPlatform.isDarwin then macfuse-stubs else fuse3;
  fuse = if stdenv.hostPlatform.isDarwin then macfuse-stubs.override { isFuse3 = true; } else fuse3;
in
stdenv.mkDerivation (finalAttrs: {
  pname = "sshfs-fuse";
@@ -32,8 +32,8 @@ stdenv.mkDerivation (finalAttrs: {
  src = fetchFromGitHub {
    owner = "libfuse";
    repo = "sshfs";
    rev = "sshfs-${finalAttrs.version}";
    inherit sha256;
    tag = "sshfs-${finalAttrs.version}";
    inherit hash;
  };

  inherit patches;
+0 −14
Original line number Diff line number Diff line
diff --git a/sshfs.c b/sshfs.c
index 97eaf06..d442577 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -14,9 +14,6 @@
 #if !defined(__CYGWIN__)
 #include <fuse_lowlevel.h>
 #endif
-#ifdef __APPLE__
-#  include <fuse_darwin.h>
-#endif
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
+5 −26
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  callPackage,
  fetchpatch,
}:
@@ -8,28 +7,8 @@
let
  mkSSHFS = args: callPackage (import ./common.nix args) { };
in
if stdenv.hostPlatform.isDarwin then
mkSSHFS {
    version = "2.10"; # macFUSE isn't yet compatible with libfuse 3.x
    sha256 = "1dmw4kx6vyawcywiv8drrajnam0m29mxfswcp4209qafzx3mjlp1";
    patches = [
      # remove reference to fuse_darwin.h which doens't exist on recent macFUSE
      ./fix-fuse-darwin-h.patch

      # From https://github.com/libfuse/sshfs/pull/185:
      # > With this patch, setting I/O size to a reasonable large value, will
      # > result in much improved performance, e.g.: -o iosize=1048576
      (fetchpatch {
        name = "fix-configurable-blksize.patch";
        url = "https://github.com/libfuse/sshfs/commit/667cf34622e2e873db776791df275c7a582d6295.patch";
        sha256 = "0d65lawd2g2aisk1rw2vl65dgxywf4vqgv765n9zj9zysyya8a54";
      })
    ];
    platforms = lib.platforms.darwin;
  }
else
  mkSSHFS {
    version = "3.7.3";
    sha256 = "0s2hilqixjmv4y8n67zaq374sgnbscp95lgz5ignp69g3p1vmhwz";
    platforms = lib.platforms.linux;
  version = "3.7.5";
  hash = "sha256-6SFjYYWx+p9tZQ670nbjbPtH/QvCAGCB0YwkaQbKIqA=";
  platforms = lib.platforms.darwin ++ lib.platforms.linux;
}