summary refs log tree commit diff
path: root/pkgs/tools/networking/ncftp/default.nix
blob: 2dcfd09bb7776069344f23a23fe835d8e3790d0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchurl, ncurses, coreutils }:

let version = "3.2.5"; in
stdenv.mkDerivation {
  name = "ncftp-${version}";

  src = fetchurl {
    url = "ftp://ftp.ncftp.com/ncftp/ncftp-${version}-src.tar.bz2";
    sha256 = "0hlx12i0lwi99qsrx7nccf4nvwjj2gych4yks5y179b1ax0y5sxl";
  };

  buildInputs = [ ncurses ];

  preConfigure = ''
    find . -name "*.sh" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
    find . -name "*.in" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
    find . -name "*.c" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
    sed 's@/bin/ls@${coreutils}/bin/ls@g' -i configure

    find . -name "*.sh" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
    find . -name "*.in" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
    find . -name "*.c" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
    sed 's@/bin/rm@${coreutils}/bin/rm@g' -i configure
  '';

  meta = with stdenv.lib; {
    description = "Command line FTP (File Transfer Protocol) client";
    homepage = http://www.ncftp.com/ncftp/;
    platforms = platforms.linux;
    maintainers = [ maintainers.bjornfor ];
  };
}