1{ lib, stdenv
2, fetchurl
3, autoreconfHook
4, gettext
5, gnutls
6, nettle
7, pkg-config
8, libiconv
9, libxcrypt
10, ApplicationServices
11}:
12
13stdenv.mkDerivation rec {
14 pname = "libfilezilla";
15 version = "0.41.0";
16
17 src = fetchurl {
18 url = "https://download.filezilla-project.org/${pname}/${pname}-${version}.tar.bz2";
19 hash = "sha256-rCodDYKOpgB4fOoefuUNIfDTvZFSzs5hh7ivyQBiKqA=";
20 };
21
22 nativeBuildInputs = [ autoreconfHook pkg-config ];
23
24 buildInputs = [ gettext gnutls nettle libxcrypt ]
25 ++ lib.optionals stdenv.isDarwin [ libiconv ApplicationServices ];
26
27 preBuild = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") ''
28 export MACOSX_DEPLOYMENT_TARGET=10.13 # for futimens()
29 '';
30
31 enableParallelBuilding = true;
32
33 meta = with lib; {
34 homepage = "https://lib.filezilla-project.org/";
35 description = "A modern C++ library, offering some basic functionality to build high-performing, platform-independent programs";
36 license = licenses.gpl2Plus;
37 maintainers = with maintainers; [ pSub ];
38 platforms = platforms.unix;
39 };
40}