1 { lib, stdenv, fetchurl, ncurses, coreutils }:
3 stdenv.mkDerivation rec {
8 url = "ftp://ftp.ncftp.com/ncftp/ncftp-${version}-src.tar.xz";
9 sha256 = "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z";
12 buildInputs = [ ncurses ];
14 enableParallelBuilding = true;
16 # Workaround build failure on -fno-common toolchains like upstream
17 # gcc-10. Otherwise build fails as:
18 # ld: bookmark.o: (.bss+0x20): multiple definition of `gBm';
19 # gpshare.o:(.bss+0x0): first defined here
20 env.NIX_CFLAGS_COMPILE = toString ([ "-fcommon" ]
21 # these are required for the configure script to work with clang
22 ++ lib.optionals stdenv.isDarwin [
24 "-Wno-implicit-function-declaration"
28 find -name Makefile.in | xargs sed -i '/^TMPDIR=/d'
30 find . -name '*.sh' -or -name '*.in' -or -name '*.c' -or -name configure | xargs sed -i \
31 -e 's@/bin/ls@${coreutils}/bin/ls@g' \
32 -e 's@/bin/rm@${coreutils}/bin/rm@g'
37 mkdir -p $out/share/doc
38 cp -r doc $out/share/doc/ncftp
43 "--mandir=$(out)/share/man/"
47 description = "Command line FTP (File Transfer Protocol) client";
48 homepage = "https://www.ncftp.com/ncftp/";
49 maintainers = with maintainers; [ bjornfor ];
50 platforms = platforms.unix;
51 license = licenses.clArtistic;