3
0
Fork 0
forked from mirrors/nixpkgs

Update atftp

This commit is contained in:
Michael Raskin 2014-09-02 00:55:54 +04:00
parent 5e1f405916
commit 5b9110233d

View file

@ -1,27 +1,34 @@
{ stdenv, fetchurl, pcre, readline }:
{ lib, stdenv, fetchurl, readline, tcp_wrappers, pcre, makeWrapper }:
assert stdenv.isLinux;
assert stdenv.gcc.gcc != null;
let
version = "0.7";
debianPatch = fetchurl {
url = "mirror://debian/pool/main/a/atftp/atftp_${version}.dfsg-11.diff.gz";
sha256 = "07g4qbmp0lnscg2dkj6nsj657jaghibvfysdm1cdxcn215n3zwqd";
};
in
stdenv.mkDerivation {
name = "atftp-0.7.1";
src = fetchurl {
url = "mirror://sourceforge/atftp/atftp-0.7.1.tar.gz";
sha256 = "0bgr31gbnr3qx4ixf8hz47l58sh3367xhcnfqd8233fvr84nyk5f";
};
buildInputs = [ pcre readline ];
NIX_LDFLAGS = "-lgcc_s"; # for pthread_cancel
configureFlags = [
"--enable-libreadline"
"--enable-libpcre"
"--enable-mtftp"
];
meta = with stdenv.lib; {
description = "Advanced TFTP server and client";
homepage = http://sourceforge.net/projects/atftp/;
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
name = "atftp";
inherit version;
src = fetchurl {
url = "mirror://debian/pool/main/a/atftp/atftp_${version}.dfsg.orig.tar.gz";
sha256 = "0nd5dl14d6z5abgcbxcn41rfn3syza6s57bbgh4aq3r9cxdmz08q";
};
buildInputs = [ readline tcp_wrappers pcre makeWrapper ];
patches = [ debianPatch ];
postInstall = ''
wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.gcc.gcc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""}
'';
meta = {
description = "Advanced tftp tools";
maintainers = lib.maintainers.raskin;
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
passthru = {
updateInfo = {
downloadPage = "http://packages.debian.org/source/wheezy/atftp";
};
};
};
}