gftp: modernize (#396891)

This commit is contained in:
Yohann Boniface
2025-08-05 01:10:25 +02:00
committed by GitHub
+20 -12
View File
@@ -12,23 +12,21 @@
openssl,
pkg-config,
readline,
nix-update-script,
versionCheckHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "gftp";
version = "2.9.1b";
src = fetchFromGitHub {
owner = "masneyb";
repo = "gftp";
rev = version;
tag = finalAttrs.version;
hash = "sha256-0zdv2oYl24BXh61IGCWby/2CCkzNjLpDrAFc0J89Pw4=";
};
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-incompatible-pointer-types" # https://github.com/masneyb/gftp/issues/178
];
nativeBuildInputs = [
autoconf
automake
@@ -45,18 +43,28 @@ stdenv.mkDerivation rec {
readline
];
# https://github.com/masneyb/gftp/issues/178
postPatch = ''
substituteInPlace lib/gftp.h \
--replace-fail "size_t remote_addr_len" "socklen_t remote_addr_len"
'';
preConfigure = ''
./autogen.sh
'';
hardeningDisable = [ "format" ];
meta = with lib; {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/masneyb/gftp";
description = "GTK-based multithreaded FTP client for *nix-based machines";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.haylin ];
platforms = lib.platforms.unix;
};
}
# TODO: report the hardeningDisable to upstream
})