lol

curlftpfs: add darwin build

+14 -5
+14 -5
pkgs/tools/filesystems/curlftpfs/default.nix
··· 1 - {lib, stdenv, fetchurl, fuse, curl, pkg-config, glib, zlib}: 1 + { lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }: 2 2 3 3 stdenv.mkDerivation { 4 4 name = "curlftpfs-0.9.2"; ··· 6 6 url = "mirror://sourceforge/curlftpfs/curlftpfs-0.9.2.tar.gz"; 7 7 sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"; 8 8 }; 9 - nativeBuildInputs = [ pkg-config ]; 10 - buildInputs = [fuse curl glib zlib]; 9 + nativeBuildInputs = [ autoreconfHook pkg-config ]; 10 + buildInputs = [ fuse curl glib zlib ]; 11 + 12 + CFLAGS = lib.optionalString stdenv.isDarwin "-D__off_t=off_t"; 13 + 14 + postPatch = lib.optionalString stdenv.isDarwin '' 15 + # Fix the build on macOS with macFUSE installed. Needs autoreconfHook for 16 + # this change to effect 17 + substituteInPlace configure.ac --replace \ 18 + 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \ 19 + "" 20 + ''; 11 21 12 22 doCheck = false; # fails, doesn't work well too, btw 13 23 ··· 15 25 description = "Filesystem for accessing FTP hosts based on FUSE and libcurl"; 16 26 homepage = "http://curlftpfs.sourceforge.net"; 17 27 license = licenses.gpl2; 18 - platforms = platforms.linux; 19 - 28 + platforms = platforms.unix; 20 29 }; 21 30 }