summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/djbdns/default.nix
blob: ad5a530bd220652814d5f3ac217d042e6fe04d63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ coreutils, gawk, fetchurl, stdenv, ... }:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "djbdns-1.05";
  src = fetchurl {
    url = "http://cr.yp.to/djbdns/djbdns-1.05.tar.gz";
    sha256 = "0j3baf92vkczr5fxww7rp1b7gmczxmmgrqc8w2dy7kgk09m85k9w";
  };
  configurePhase = ''
    echo $out > conf-home
    echo gcc -O2 -include errno.h > conf-cc
  '';
  patchPhase = ''
    sed -i 's:c("/","etc","dnsroots.global",-1,-1,0644);:// &:' hier.c
    sed -i '1s@^@PATH=${makeBinPath [ coreutils gawk ]}\n@' dnstracesort.sh
  '';
  installTargets = "setup check";
}