diff --git a/pkgs/by-name/gf/gftp/package.nix b/pkgs/by-name/gf/gftp/package.nix index d90a8b663bbf..e52d6236085c 100644 --- a/pkgs/by-name/gf/gftp/package.nix +++ b/pkgs/by-name/gf/gftp/package.nix @@ -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 +})