From 08b8512ce41fbecfb5223a55927d55624b9e7bc0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 28 Jan 2013 14:12:29 +0100 Subject: lftp: Update to 4.4.0 and fix build http://hydra.nixos.org/build/3896385 --- pkgs/tools/networking/lftp/default.nix | 16 ++++++++++++---- pkgs/tools/networking/lftp/no-gets.patch | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pkgs/tools/networking/lftp/no-gets.patch (limited to 'pkgs/tools/networking/lftp') diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index 64e7ac50bc0f9..e2d1d8ed62a34 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -1,12 +1,20 @@ -{stdenv, fetchurl, gnutls, libtasn1, pkgconfig, readline, zlib, xz}: +{ stdenv, fetchurl, gnutls, pkgconfig, readline, zlib, xz }: stdenv.mkDerivation rec { - name = "lftp-4.3.1"; + name = "lftp-4.4.0"; src = fetchurl { url = "ftp://ftp.cs.tu-berlin.de/pub/net/ftp/lftp/${name}.tar.xz"; - sha256 = "0v3591fknmimarzk5icm0qxdcfzfckwi2drh165vsiggmj590iyx"; + sha256 = "0cg4gabya2sygbwh2b0cdr8v719q9gv929hdb5g1mxgj8npjd4y7"; }; - buildInputs = [gnutls libtasn1 pkgconfig readline zlib]; + patches = [ ./no-gets.patch ]; + + buildInputs = [ gnutls pkgconfig readline zlib ]; + + meta = { + homepage = http://lftp.yar.ru/; + description = "A file transfer program supporting a number of network protocols"; + license = "GPL"; + }; } diff --git a/pkgs/tools/networking/lftp/no-gets.patch b/pkgs/tools/networking/lftp/no-gets.patch new file mode 100644 index 0000000000000..0c2cb7c8ae6c0 --- /dev/null +++ b/pkgs/tools/networking/lftp/no-gets.patch @@ -0,0 +1,15 @@ +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -702,10 +702,12 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning; besides, C11 + removed it. */ ++#ifdef gets + #undef gets + #if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif ++#endif + + + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ -- cgit 1.4.1