about summary refs log tree commit diff
path: root/pkgs/tools/networking/miredo/default.nix
blob: 48b6f5dc4cf5984f970469498b5b373844e5a039 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, stdenv, fetchurl, nettools, iproute, judy }:

stdenv.mkDerivation rec {
  version = "1.2.6";
  pname = "miredo";

  buildInputs = [ judy ];

  src = fetchurl {
    url = "https://www.remlab.net/files/miredo/miredo-${version}.tar.xz";
    sha256 = "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps";
  };

  postPatch = ''
    substituteInPlace misc/client-hook.bsd \
      --replace '/sbin/route' '${nettools}/bin/route' \
      --replace '/sbin/ifconfig' '${nettools}/bin/ifconfig'
    substituteInPlace misc/client-hook.iproute --replace '/sbin/ip' '${iproute}/bin/ip'
  '';

  configureFlags = [ "--with-Judy" ];

  postInstall = ''
    rm -rf $out/lib/systemd $out/var $out/etc/miredo/miredo.conf
  '';

  meta = with lib; {
    description = "Teredo IPv6 Tunneling Daemon";
    homepage = "https://www.remlab.net/miredo/";
    license = licenses.gpl2;
    maintainers = [ maintainers.volth ];
    platforms = platforms.unix;
  };
}