{ pkgs, ... }: { sane.programs.curlftpfs = { packageUnwrapped = pkgs.curlftpfs.overrideAttrs (upstream: { # my fork includes: # - per-operation timeouts (CURLOPT_TIMEOUT; would use CURLOPT_LOW_SPEED_TIME/CURLOPT_LOW_SPEED_LIMIT but they don't apply) # - support for "meta" keys found in /etc/fstab src = pkgs.fetchFromGitea { domain = "git.uninsane.org"; owner = "colin"; repo = "curlftpfs"; rev = "a413f331263e8818229f20266f3a5bf6fac3ad4d"; hash = "sha256-nLJEKeXIZ0FpveiOf8HjOLkrgdoiT2/XyQDo8Cfj8BQ="; }; # `mount` clears PATH before calling the mount helper (see util-linux/lib/env.c), # so the traditional /etc/fstab approach of fstype=fuse and device = curlftpfs#URI doesn't work. # instead, install a `mount.curlftpfs` mount helper. this is what programs like `gocryptfs` do. postInstall = (upstream.postInstall or "") + '' ln -s curlftpfs $out/bin/mount.fuse.curlftpfs ln -s curlftpfs $out/bin/mount.curlftpfs ''; }); }; }