4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1 KiB
Nix
42 lines
1 KiB
Nix
{ lib, stdenv, fetchurl, ncurses, coreutils }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ncftp";
|
|
version = "3.2.6";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.ncftp.com/ncftp/ncftp-${version}-src.tar.xz";
|
|
sha256 = "1389657cwgw5a3kljnqmhvfh4vr2gcr71dwz1mlhf22xq23hc82z";
|
|
};
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
preConfigure = ''
|
|
find -name Makefile.in | xargs sed -i '/^TMPDIR=/d'
|
|
|
|
find . -name '*.sh' -or -name '*.in' -or -name '*.c' -or -name configure | xargs sed -i \
|
|
-e 's@/bin/ls@${coreutils}/bin/ls@g' \
|
|
-e 's@/bin/rm@${coreutils}/bin/rm@g'
|
|
'';
|
|
|
|
postInstall = ''
|
|
rmdir $out/etc
|
|
mkdir -p $out/share/doc
|
|
cp -r doc $out/share/doc/ncftp
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--enable-ssp"
|
|
"--mandir=$(out)/share/man/"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Command line FTP (File Transfer Protocol) client";
|
|
homepage = "https://www.ncftp.com/ncftp/";
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
platforms = platforms.unix;
|
|
license = licenses.clArtistic;
|
|
};
|
|
}
|