rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / tools / networking / ncftp / default.nix
blobc31e6333b68469837cda4dedaa0e6d9c550f9a21
1 { lib, stdenv, fetchurl, ncurses, coreutils }:
3 stdenv.mkDerivation rec {
4   pname = "ncftp";
5   version = "3.2.6";
7   src = fetchurl {
8     url = "ftp://ftp.ncftp.com/ncftp/ncftp-${version}-src.tar.xz";
9     sha256 = "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z";
10   };
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 [
23       "-Wno-implicit-int"
24       "-Wno-implicit-function-declaration"
25     ]);
27   preConfigure = ''
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'
33   '';
35   postInstall = ''
36     rmdir $out/etc
37     mkdir -p $out/share/doc
38     cp -r doc $out/share/doc/ncftp
39   '';
41   configureFlags = [
42     "--enable-ssp"
43     "--mandir=$(out)/share/man/"
44   ];
46   meta = with lib; {
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;
52   };