2021-04-22 02:08:21 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "curlftpfs";
|
|
|
|
version = "0.9.2";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-05-28 09:39:13 +00:00
|
|
|
url = "mirror://sourceforge/curlftpfs/curlftpfs-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f";
|
|
|
|
};
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# This removes AC_FUNC_MALLOC and AC_FUNC_REALLOC from configure.ac because
|
|
|
|
# it is known to cause problems. Search online for "rpl_malloc" and
|
|
|
|
# "rpl_realloc" to find out more.
|
|
|
|
./fix-rpl_malloc.patch
|
2023-10-09 19:29:22 +00:00
|
|
|
./suse-bug-580609.patch
|
|
|
|
./suse-bug-955687.patch
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
|
|
|
|
2021-04-22 02:08:21 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
|
|
buildInputs = [ fuse curl glib zlib ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D__off_t=off_t";
|
2021-04-22 02:08:21 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2021-04-22 02:08:21 +00:00
|
|
|
# Fix the build on macOS with macFUSE installed. Needs autoreconfHook for
|
|
|
|
# this change to effect
|
|
|
|
substituteInPlace configure.ac --replace \
|
|
|
|
'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \
|
|
|
|
""
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false; # fails, doesn't work well too, btw
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Filesystem for accessing FTP hosts based on FUSE and libcurl";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "curlftpfs";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://curlftpfs.sourceforge.net";
|
2021-05-28 09:39:13 +00:00
|
|
|
license = licenses.gpl2Only;
|
2021-04-22 02:08:21 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|