1{
2 fetchgit,
3 lib,
4 stdenv,
5 pkg-config,
6 libnsl,
7 libtirpc,
8 autoreconfHook,
9 useSystemd ? true,
10 systemd,
11}:
12
13stdenv.mkDerivation {
14 pname = "rpcbind";
15 version = "1.2.6";
16
17 src = fetchgit {
18 url = "git://git.linux-nfs.org/projects/steved/rpcbind.git";
19 rev = "c0c89b3bf2bdf304a5fe3cab626334e0cdaf1ef2";
20 hash = "sha256-aidETIZaQYzC3liDGM915wyBWpMrn4OudxEcFS/Iucw=";
21 };
22
23 patches = [
24 ./sunrpc.patch
25 ];
26
27 buildInputs = [
28 libnsl
29 libtirpc
30 ]
31 ++ lib.optional useSystemd systemd;
32
33 configureFlags = [
34 "--with-systemdsystemunitdir=${
35 if useSystemd then "${placeholder "out"}/etc/systemd/system" else "no"
36 }"
37 "--enable-warmstarts"
38 "--with-rpcuser=rpc"
39 ];
40
41 nativeBuildInputs = [
42 autoreconfHook
43 pkg-config
44 ];
45
46 meta = with lib; {
47 description = "ONC RPC portmapper";
48 license = licenses.bsd3;
49 platforms = platforms.unix;
50 homepage = "https://linux-nfs.org/";
51 maintainers = with maintainers; [ abbradar ];
52 longDescription = ''
53 Universal addresses to RPC program number mapper.
54 '';
55 };
56}