2017-11-27 18:12:21 +00:00
|
|
|
{ fetchurl, stdenv, pkgconfig, libnsl, libtirpc, fetchpatch
|
2015-02-18 02:02:46 +00:00
|
|
|
, useSystemd ? true, systemd }:
|
2012-03-21 20:35:15 +00:00
|
|
|
|
2017-01-29 17:06:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-18 02:02:46 +00:00
|
|
|
name = "rpcbind-${version}";
|
2018-08-16 20:51:41 +00:00
|
|
|
version = "1.2.5";
|
2016-12-01 00:18:08 +00:00
|
|
|
|
2012-03-21 20:35:15 +00:00
|
|
|
src = fetchurl {
|
2015-02-18 02:02:46 +00:00
|
|
|
url = "mirror://sourceforge/rpcbind/${version}/${name}.tar.bz2";
|
2018-08-16 20:51:41 +00:00
|
|
|
sha256 = "0ynszy5hpc7wbz8xngqwyhgbi9cay73y43izqhcmrcv375l61qrc";
|
2012-03-21 20:35:15 +00:00
|
|
|
};
|
|
|
|
|
2016-01-13 18:16:28 +00:00
|
|
|
patches = [
|
|
|
|
./sunrpc.patch
|
2017-11-27 18:12:21 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2017-8779.patch";
|
|
|
|
url = "https://raw.githubusercontent.com/guidovranken/rpcbomb/e6da9e489aa8ad000b0ad5ac9abc5b4eefc3a769/rpcbind_patch.txt";
|
|
|
|
sha256 = "0w231w8fxihgrn526np078j3vbj3ylvjvxjmfpjvqhga5zg821ab";
|
|
|
|
})
|
2016-01-13 18:16:28 +00:00
|
|
|
];
|
2012-03-22 11:16:28 +00:00
|
|
|
|
2017-11-07 19:34:51 +00:00
|
|
|
buildInputs = [ libnsl libtirpc ]
|
2015-02-18 02:02:46 +00:00
|
|
|
++ stdenv.lib.optional useSystemd systemd;
|
2012-03-21 20:35:15 +00:00
|
|
|
|
2017-01-29 17:06:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-systemdsystemunitdir=${if useSystemd then "$(out)/etc/systemd/system" else "no"}"
|
|
|
|
"--enable-warmstarts"
|
|
|
|
"--with-rpcuser=rpc"
|
|
|
|
];
|
2012-03-21 20:35:15 +00:00
|
|
|
|
2015-02-18 02:02:46 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2012-03-21 20:35:15 +00:00
|
|
|
description = "ONC RPC portmapper";
|
2015-02-18 02:02:46 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://sourceforge.net/projects/rpcbind/;
|
2015-02-18 02:02:46 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2012-03-21 20:35:15 +00:00
|
|
|
longDescription = ''
|
|
|
|
Universal addresses to RPC program number mapper.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|