curlftpfs: fix sandboxed builds on darwin

+27 -4
+14 -4
pkgs/tools/filesystems/curlftpfs/default.nix
··· 1 1 { lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }: 2 2 3 - stdenv.mkDerivation { 4 - name = "curlftpfs-0.9.2"; 3 + stdenv.mkDerivation rec { 4 + pname = "curlftpfs"; 5 + version = "0.9.2"; 6 + 5 7 src = fetchurl { 6 - url = "mirror://sourceforge/curlftpfs/curlftpfs-0.9.2.tar.gz"; 8 + url = "mirror://sourceforge/curlftpfs/curlftpfs-${version}.tar.gz"; 7 9 sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"; 8 10 }; 11 + 12 + patches = [ 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 + ]; 18 + 9 19 nativeBuildInputs = [ autoreconfHook pkg-config ]; 10 20 buildInputs = [ fuse curl glib zlib ]; 11 21 ··· 24 34 meta = with lib; { 25 35 description = "Filesystem for accessing FTP hosts based on FUSE and libcurl"; 26 36 homepage = "http://curlftpfs.sourceforge.net"; 27 - license = licenses.gpl2; 37 + license = licenses.gpl2Only; 28 38 platforms = platforms.unix; 29 39 }; 30 40 }
+13
pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch
··· 1 + diff -Naur a/configure.ac b/configure.ac 2 + --- a/configure.ac 2008-04-23 20:37:42.000000000 +0900 3 + +++ b/configure.ac 2021-05-16 01:28:24.000000000 +0900 4 + @@ -46,9 +46,7 @@ 5 + 6 + # Checks for library functions. 7 + AC_FUNC_CHOWN 8 + -AC_FUNC_MALLOC 9 + AC_FUNC_MKTIME 10 + -AC_FUNC_REALLOC 11 + AC_FUNC_SELECT_ARGTYPES 12 + AC_FUNC_STRFTIME 13 + AC_FUNC_UTIME_NULL