about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/sshfs-fuse/default.nix
blob: 879199347bd1809ecf237f5d25b8366cc75b6b3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ lib, stdenv, callPackage, fetchpatch }:

let mkSSHFS = args: callPackage (import ./common.nix args) { };
in if stdenv.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.2";
    sha256 = "0i0ycgwdxja8313hlkrlwrl85a4ykkyqddgg484jkr4rnr7ylk8w";
    platforms = lib.platforms.linux;
  }