2018-07-20 17:44:44 -07:00
|
|
|
{ fetchurl, stdenv, autoreconfHook, libkrb5 }:
|
2011-11-03 14:08:32 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-31 12:33:35 -07:00
|
|
|
name = "libtirpc-1.1.4";
|
2011-11-03 14:08:32 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-03-17 10:44:20 -07:00
|
|
|
url = "mirror://sourceforge/libtirpc/${name}.tar.bz2";
|
2018-08-31 12:33:35 -07:00
|
|
|
sha256 = "07anqypf7c719x9y683qz65cxllmzlgmlab2hlahrqcj4bq2k99c";
|
2011-11-03 14:08:32 -07:00
|
|
|
};
|
|
|
|
|
2018-10-11 08:00:01 -07:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2017-11-06 11:33:36 -08:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <stdint.h>' -i src/xdr_sizeof.c
|
2018-03-24 12:00:08 -07:00
|
|
|
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
substituteInPlace tirpc/rpc/types.h \
|
|
|
|
--replace '#if defined __APPLE_CC__ || defined __FreeBSD__' \
|
|
|
|
'#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined __GLIBC__'
|
2017-11-06 11:33:36 -08:00
|
|
|
'';
|
|
|
|
|
2018-11-20 19:29:45 -08:00
|
|
|
KRB5_CONFIG = "${libkrb5.dev}/bin/krb5-config";
|
2015-07-28 05:23:08 -07:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2015-06-26 17:19:12 -07:00
|
|
|
propagatedBuildInputs = [ libkrb5 ];
|
2014-01-15 07:43:51 -08:00
|
|
|
|
2012-03-17 10:44:20 -07:00
|
|
|
preConfigure = ''
|
2012-03-21 02:18:40 -07:00
|
|
|
sed -es"|/etc/netconfig|$out/etc/netconfig|g" -i doc/Makefile.in tirpc/netconfig.h
|
2012-03-17 10:44:20 -07:00
|
|
|
'';
|
|
|
|
|
2012-01-18 12:16:00 -08:00
|
|
|
preInstall = "mkdir -p $out/etc";
|
2011-11-03 14:08:32 -07:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2015-02-17 18:05:04 -08:00
|
|
|
meta = with stdenv.lib; {
|
2017-11-10 13:13:27 -08:00
|
|
|
homepage = https://sourceforge.net/projects/libtirpc/;
|
2011-11-03 14:08:32 -07:00
|
|
|
description = "The transport-independent Sun RPC implementation (TI-RPC)";
|
2015-02-17 18:05:04 -08:00
|
|
|
license = licenses.bsd3;
|
2015-04-03 23:52:52 -07:00
|
|
|
platforms = platforms.linux;
|
2015-02-17 18:05:04 -08:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2012-03-17 10:44:20 -07:00
|
|
|
longDescription = ''
|
|
|
|
Currently, NFS commands use the SunRPC routines provided by the
|
|
|
|
glibc. These routines do not support IPv6 addresses. Ulrich
|
|
|
|
Drepper, who is the maintainer of the glibc, refuses any change in
|
|
|
|
the glibc concerning the RPC. He wants the RPC to become a separate
|
|
|
|
library. Other OS (NetBSD, FreeBSD, Solarix, HP-UX, AIX) have
|
|
|
|
migrated their SunRPC library to a TI-RPC (Transport Independent
|
|
|
|
RPC) implementation. This implementation allows the support of
|
|
|
|
other transports than UDP and TCP over IPv4. FreeBSD provides a
|
2014-12-29 18:31:03 -08:00
|
|
|
TI-RPC library ported from NetBSD with improvements. This library
|
2012-03-17 10:44:20 -07:00
|
|
|
already supports IPv6. So, the FreeBSD release 5.2.1 TI-RPC has
|
|
|
|
been ported to replace the SunRPC of the glibc.
|
|
|
|
'';
|
2011-11-03 14:08:32 -07:00
|
|
|
};
|
|
|
|
}
|