2022-09-30 02:06:10 +00:00
|
|
|
{ lib, stdenv, fetchurl, libxcrypt }:
|
2018-04-23 03:00:33 +00:00
|
|
|
|
2021-07-25 21:53:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-11-28 12:54:57 +00:00
|
|
|
pname = "bftpd";
|
2023-11-16 13:40:53 +00:00
|
|
|
version = "6.2";
|
2018-04-23 03:00:33 +00:00
|
|
|
|
2016-11-28 12:54:57 +00:00
|
|
|
src = fetchurl {
|
2021-07-25 21:53:02 +00:00
|
|
|
url = "mirror://sourceforge/project/${pname}/${pname}/${pname}-${version}/${pname}-${version}.tar.gz";
|
2023-11-16 13:40:53 +00:00
|
|
|
sha256 = "sha256-lZGFsUV6LNjkBNUpV9UYedVt1yt1qTBJUorxGt4ApsI=";
|
2016-11-28 12:54:57 +00:00
|
|
|
};
|
2018-04-23 03:00:33 +00:00
|
|
|
|
2022-11-03 11:08:23 +00:00
|
|
|
# utmp.h is deprecated on aarch64-darwin
|
|
|
|
postPatch = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
|
|
|
|
for file in login.*; do
|
|
|
|
substituteInPlace $file --replace "#ifdef HAVE_UTMP_H" "#if 0"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-09-30 02:06:10 +00:00
|
|
|
buildInputs = [ libxcrypt ];
|
|
|
|
|
2024-06-15 22:15:43 +00:00
|
|
|
CFLAGS = "-std=gnu89";
|
|
|
|
|
2016-11-28 12:54:57 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed -re 's/-[og] 0//g' -i Makefile*
|
|
|
|
'';
|
2018-04-23 03:00:33 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/doc/${pname}
|
|
|
|
mv $out/etc/*.conf $out/share/doc/${pname}
|
|
|
|
rm -rf $out/{etc,var}
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-23 03:00:33 +00:00
|
|
|
description = "Minimal ftp server";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "bftpd";
|
2016-11-28 12:54:57 +00:00
|
|
|
downloadPage = "http://bftpd.sf.net/download.html";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://bftpd.sf.net/";
|
2018-04-23 03:00:33 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
2020-08-13 04:20:00 +00:00
|
|
|
platforms = platforms.all;
|
2016-11-28 12:54:57 +00:00
|
|
|
};
|
|
|
|
}
|