···11---- bsd-finger-0.17.orig/fingerd/fingerd.8
22-+++ bsd-finger-0.17/fingerd/fingerd.8
33-@@ -36,10 +36,10 @@
44- .Dt FINGERD 8
55- .Os "Linux NetKit (0.17)"
66- .Sh NAME
77--.Nm fingerd
88-+.Nm in.fingerd
99- .Nd remote user information server
1010- .Sh SYNOPSIS
1111--.Nm fingerd
1212-+.Nm in.fingerd
1313- .Op Fl wulf
1414- .Op Fl pL Ar path
1515- .Op Fl t Ar timeout
1616-@@ -61,7 +61,7 @@
1717- banner
1818- which also shows some informations (e.g. uptime, operating system name and
1919- release) about the system the
2020--.Nm fingerd
2121-+.Nm in.fingerd
2222- is running on. Some sites may consider this a security risk as it
2323- gives out information that may be useful to crackers.
2424- .Pp
2525-@@ -85,7 +85,7 @@
2626- .Pp
2727- The
2828- .Fl p
2929--option allows specification of an alternate location for fingerd to find
3030-+option allows specification of an alternate location for in.fingerd to find
3131- the
3232- .Dq finger
3333- program. The
3434-@@ -97,7 +97,7 @@
3535- option specifies the time to wait for a request before closing the
3636- connection. A value of 0 waits forever. The default is 60 seconds.
3737- .Pp
3838--Options to fingerd should be specified in
3939-+Options to in.fingerd should be specified in
4040- .Pa /etc/inetd.conf .
4141- .Pp
4242- The finger protocol consists mostly of specifying command arguments.
4343-@@ -105,12 +105,12 @@
4444- .Xr inetd 8
4545- .Dq super-server
4646- runs
4747--.Nm fingerd
4848-+.Nm in.fingerd
4949- for
5050- .Tn TCP
5151- requests received on port 79.
5252- Once connected
5353--.Nm fingerd
5454-+.Nm in.fingerd
5555- reads a single command line
5656- terminated by a
5757- .Aq Tn CRLF
5858---- bsd-finger-0.17.orig/fingerd/fingerd.c
5959-+++ bsd-finger-0.17/fingerd/fingerd.c
6060-@@ -55,6 +55,7 @@
6161- #include <netinet/in.h>
6262- #include <sys/utsname.h>
6363- #include <sys/wait.h>
6464-+#include <sys/socket.h>
6565-6666- #include "pathnames.h"
6767- #include "../version.h"
+30-9
pkgs/tools/networking/bsd-finger/default.nix
···11-{ lib, stdenv, fetchurl }:
22-33-# !!! Duplication: this package is almost exactly the same as `bsd-finger'.
11+{ lib
22+, stdenv
33+, fetchurl
44+, buildClient ? true
55+}:
4657stdenv.mkDerivation rec {
66- pname = "bsd-finger";
88+ srcName = "bsd-finger";
99+ pname = srcName + lib.optionalString (!buildClient) "d";
710 version = "0.17";
811912 src = fetchurl {
1010- url = "mirror://ibiblioPubLinux/system/network/finger/bsd-finger-${version}.tar.gz";
1111- sha256 = "1yhkiv0in588il7f84k2xiy78g9lv12ll0y7047gazhiimk5v244";
1313+ url = "mirror://ibiblioPubLinux/system/network/finger/${srcName}-${version}.tar.gz";
1414+ hash = "sha256-hIhdZo0RfvUOAccDSkXYND10fOxiEuQOjQgVG8GOE/o=";
1215 };
13161717+ # outputs = [ "out" "man" ];
1818+1419 NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
15201616- patches = [ ./ubuntu-0.17-9.patch ];
2121+ patches = [
2222+ ./ubuntu-0.17-9.patch
2323+ ];
17241818- preBuild = "cd finger";
2525+ preBuild = let
2626+ srcdir = if buildClient then "finger" else "fingerd";
2727+ in ''
2828+ cd ${srcdir}
2929+ '';
19302020- preInstall = "mkdir -p $out/man/man1 $out/bin ";
3131+ preInstall = let
3232+ bindir = if buildClient then "bin" else "sbin";
3333+ mandir = if buildClient then "man/man1" else "man/man8";
3434+ in ''
3535+ mkdir -p $out/${bindir} $out/${mandir}
3636+ '';
21372238 meta = with lib; {
3939+ description =
4040+ if buildClient
4141+ then "User information lookup program"
4242+ else "Remote user information server";
2343 platforms = platforms.linux;
2444 license = licenses.bsdOriginal;
2545 };
2646}
4747+# TODO: multiple outputs (manpage)