iputils: 20161105 -> 20180629

This commit is contained in:
Michael Weiss 2018-08-18 20:06:49 +02:00
parent e2915cec9c
commit 451d268e1d
2 changed files with 32 additions and 20 deletions

View File

@ -1,33 +1,45 @@
{ stdenv, fetchurl { stdenv, fetchFromGitHub, fetchpatch
, sysfsutils, openssl , libxslt, docbook_xsl, docbook_xml_dtd_44
, libcap, opensp, docbook_sgml_dtd_31 , sysfsutils, openssl, libcap, libgcrypt, nettle, libidn2
, libidn, nettle }:
, SGMLSpm, libgcrypt }:
let let
time = "20161105"; time = "20180629";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "iputils-${time}"; name = "iputils-${time}";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/iputils/iputils/archive/s${time}.tar.gz"; owner = "iputils";
sha256 = "12mdmh4qbf5610csaw3rkzhpzf6djndi4jsl4gyr8wni0cphj4zq"; repo = "iputils";
rev = "s${time}";
sha256 = "19rpl48pjgmyqlm4h7sml5gy7yg4cxciadxcs24q1zj40c05jls0";
}; };
patches = [
(fetchpatch {
name = "dont-hardcode-the-location-of-xsltproc.patch";
url = "https://github.com/iputils/iputils/commit/d0ff83e87ea9064d9215a18e93076b85f0f9e828.patch";
sha256 = "05wrwf0bfmax69bsgzh3b40n7rvyzw097j8z5ix0xsg0kciygjvx";
})
];
prePatch = '' prePatch = ''
sed -e s/sgmlspl/sgmlspl.pl/ \ substituteInPlace doc/custom-man.xsl \
-e s/nsgmls/onsgmls/ \ --replace "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" "${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
-i doc/Makefile for xmlFile in doc/*.xml; do
substituteInPlace $xmlFile \
--replace "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" "${docbook_xml_dtd_44}/xml/dtd/docbook/docbookx.dtd"
done
''; '';
# Disable idn usage w/musl: https://github.com/iputils/iputils/pull/111 # Disable idn usage w/musl: https://github.com/iputils/iputils/pull/111
makeFlags = [ "USE_GNUTLS=no" ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "USE_IDN=no"; makeFlags = [ "USE_GNUTLS=no" ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "USE_IDN=no";
depsBuildBuild = [ opensp SGMLSpm docbook_sgml_dtd_31 ]; nativeBuildInputs = [ libxslt.bin ];
buildInputs = [ buildInputs = [
sysfsutils openssl libcap libgcrypt nettle sysfsutils openssl libcap libgcrypt nettle
] ++ stdenv.lib.optional (!stdenv.hostPlatform.isMusl) libidn; ] ++ stdenv.lib.optional (!stdenv.hostPlatform.isMusl) libidn2;
# ninfod probably could build on cross, but the Makefile doesn't pass --host etc to the sub configure... # ninfod probably could build on cross, but the Makefile doesn't pass --host etc to the sub configure...
buildFlags = "man all" + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) " ninfod"; buildFlags = "man all" + stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) " ninfod";
@ -35,21 +47,23 @@ stdenv.mkDerivation rec {
installPhase = installPhase =
'' ''
mkdir -p $out/bin mkdir -p $out/bin
cp -p ping tracepath clockdiff arping rdisc rarpd $out/bin/ cp -p arping clockdiff ping rarpd rdisc tftpd tracepath traceroute6 $out/bin/
if [ -x ninfod/ninfod ]; then if [ -x ninfod/ninfod ]; then
cp -p ninfod/ninfod $out/bin cp -p ninfod/ninfod $out/bin
fi fi
mkdir -p $out/share/man/man8 mkdir -p $out/share/man/man8
cd doc
cp -p \ cp -p \
doc/clockdiff.8 doc/arping.8 doc/ping.8 doc/rdisc.8 doc/rarpd.8 doc/tracepath.8 doc/ninfod.8 \ arping.8 clockdiff.8 ninfod.8 pg3.8 ping.8 rarpd.8 rdisc.8 tftpd.8 tracepath.8 traceroute6.8 \
$out/share/man/man8 $out/share/man/man8
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/iputils/iputils; homepage = https://github.com/iputils/iputils;
description = "A set of small useful utilities for Linux networking"; description = "A set of small useful utilities for Linux networking";
license = with licenses; [ gpl2Plus bsd3 ]; # TODO: AS-IS, SUN MICROSYSTEMS license
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ lheckemann ]; maintainers = with maintainers; [ primeos lheckemann ];
}; };
} }

View File

@ -13734,9 +13734,7 @@ with pkgs;
iproute = callPackage ../os-specific/linux/iproute { }; iproute = callPackage ../os-specific/linux/iproute { };
iputils = callPackage ../os-specific/linux/iputils { iputils = callPackage ../os-specific/linux/iputils { };
inherit (buildPackages.buildPackages.perlPackages) SGMLSpm;
};
iptables = callPackage ../os-specific/linux/iptables { }; iptables = callPackage ../os-specific/linux/iptables { };