diff options
author | midchildan <git@midchildan.org> | 2021-03-26 01:33:16 +0900 |
---|---|---|
committer | midchildan <git@midchildan.org> | 2021-04-20 00:51:34 +0900 |
commit | f21bfdd75b7d59b409df0550024526c2d464e00c (patch) | |
tree | e9d3093f429cf986862b94a44559486fe5dc1b77 /pkgs/tools | |
parent | 21f9e5aac26d1255f06469740ab96423c26614b6 (diff) |
curlftpfs: add darwin build
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/filesystems/curlftpfs/default.nix | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/tools/filesystems/curlftpfs/default.nix b/pkgs/tools/filesystems/curlftpfs/default.nix index 4bfa22838ad9f..2c5d886c14df7 100644 --- a/pkgs/tools/filesystems/curlftpfs/default.nix +++ b/pkgs/tools/filesystems/curlftpfs/default.nix @@ -1,4 +1,4 @@ -{lib, stdenv, fetchurl, fuse, curl, pkg-config, glib, zlib}: +{ lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }: stdenv.mkDerivation { name = "curlftpfs-0.9.2"; @@ -6,8 +6,18 @@ stdenv.mkDerivation { url = "mirror://sourceforge/curlftpfs/curlftpfs-0.9.2.tar.gz"; sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [fuse curl glib zlib]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = [ fuse curl glib zlib ]; + + CFLAGS = lib.optionalString stdenv.isDarwin "-D__off_t=off_t"; + + postPatch = lib.optionalString stdenv.isDarwin '' + # 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' \ + "" + ''; doCheck = false; # fails, doesn't work well too, btw @@ -15,7 +25,6 @@ stdenv.mkDerivation { description = "Filesystem for accessing FTP hosts based on FUSE and libcurl"; homepage = "http://curlftpfs.sourceforge.net"; license = licenses.gpl2; - platforms = platforms.linux; - + platforms = platforms.unix; }; } |