nixpkgs-suyu/pkgs/servers/rpcbind/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

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