@@ -1,8 +1,8 @@
11{ stdenv, fetchurl, ncurses, coreutils }:
22
3−let version = "3.2.6"; in
4−stdenv.mkDerivation {
3+stdenv.mkDerivation rec {
54 name = "ncftp-${version}";
5+ version = "3.2.6";
66
77 src = fetchurl {
88 url = "ftp://ftp.ncftp.com/ncftp/ncftp-${version}-src.tar.xz";
@@ -11,24 +11,29 @@ stdenv.mkDerivation {
1111
1212 buildInputs = [ ncurses ];
1313
14+ enableParallelBuilding = true;
15+
1416 preConfigure = ''
15− find . -name "*.sh" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
16− find . -name "*.in" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
17− find . -name "*.c" -type f | xargs sed 's@/bin/ls@${coreutils}/bin/ls@g' -i
18− sed 's@/bin/ls@${coreutils}/bin/ls@g' -i configure
19−
20− find . -name "*.sh" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
21− find . -name "*.in" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
22− find . -name "*.c" -type f | xargs sed 's@/bin/rm@${coreutils}/bin/rm@g' -i
23− sed 's@/bin/rm@${coreutils}/bin/rm@g' -i configure
17+ find . -name '*.sh' -or -name '*.in' -or -name '*.c' -or -name configure | xargs sed -i \
18+ -e 's@/bin/ls@${coreutils}/bin/ls@g' \
19+ -e 's@/bin/rm@${coreutils}/bin/rm@g'
20+ '';
21+
22+ postInstall = ''
23+ rmdir $out/etc
24+ mkdir -p $out/share/doc
25+ cp -r doc $out/share/doc/ncftp
2426 '';
2527
26− configureFlags = [ "--mandir=$out/share/man/" ];
28+ configureFlags = [
29+ "--enable-ssp"
30+ "--mandir=$(out)/share/man/"
31+ ];
2732
2833 meta = with stdenv.lib; {
2934 description = "Command line FTP (File Transfer Protocol) client";
30− homepage = http://www.ncftp.com/ncftp/;
35+ homepage = https://www.ncftp.com/ncftp/;
36+ maintainers = with maintainers; [ bjornfor ];
3137 platforms = platforms.unix;
32− maintainers = [ maintainers.bjornfor ];
3338 };
3439}