gftp: modernize
This commit is contained in:
parent
e1a5871e76
commit
0b2d1c35b1
@ -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
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user