1{
2 lib,
3 stdenv,
4 fetchurl,
5 libresolv,
6 perl,
7}:
8
9stdenv.mkDerivation rec {
10 version = "1.10";
11 pname = "dnstracer";
12
13 src = fetchurl {
14 url = "https://www.mavetju.org/download/${pname}-${version}.tar.bz2";
15 sha256 = "089bmrjnmsga2n0r4xgw4bwbf41xdqsnmabjxhw8lngg2pns1kb4";
16 };
17
18 outputs = [
19 "out"
20 "man"
21 ];
22
23 nativeBuildInputs = [
24 perl # for pod2man
25 ];
26
27 setOutputFlags = false;
28
29 installPhase = ''
30 install -Dm755 -t $out/bin dnstracer
31 install -Dm755 -t $man/share/man/man8 dnstracer.8
32 '';
33
34 buildInputs = [ ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libresolv ];
35
36 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lresolv";
37
38 meta = with lib; {
39 description = "Determines where a given Domain Name Server (DNS) gets its information from, and follows the chain of DNS servers back to the servers which know the data";
40 homepage = "http://www.mavetju.org/unix/general.php";
41 license = licenses.bsd2;
42 maintainers = [ ];
43 platforms = platforms.all;
44 mainProgram = "dnstracer";
45 };
46}