1 { lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/curlftpfs/curlftpfs-${version}.tar.gz";
9 sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f";
13 # This removes AC_FUNC_MALLOC and AC_FUNC_REALLOC from configure.ac because
14 # it is known to cause problems. Search online for "rpl_malloc" and
15 # "rpl_realloc" to find out more.
16 ./fix-rpl_malloc.patch
17 ./suse-bug-580609.patch
18 ./suse-bug-955687.patch
21 nativeBuildInputs = [ autoreconfHook pkg-config ];
22 buildInputs = [ fuse curl glib zlib ];
24 CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D__off_t=off_t";
26 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
27 # Fix the build on macOS with macFUSE installed. Needs autoreconfHook for
28 # this change to effect
29 substituteInPlace configure.ac --replace \
30 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \
34 doCheck = false; # fails, doesn't work well too, btw
37 description = "Filesystem for accessing FTP hosts based on FUSE and libcurl";
38 mainProgram = "curlftpfs";
39 homepage = "https://curlftpfs.sourceforge.net";
40 license = licenses.gpl2Only;
41 platforms = platforms.unix;