about summary refs log tree commit diff
path: root/pkgs/tools/networking/ppp/default.nix
blob: 2ca22fb1da7ccfa93b8f36da89660aa704a02ca2 (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
{ stdenv, fetchurl, substituteAll, libpcap }:

stdenv.mkDerivation rec {
  version = "2.4.5";
  name = "ppp-${version}";

  src = fetchurl {
    url = "${meta.homepage}ftp/ppp/${name}.tar.gz";
    sha256 = "019m00q85nrgdpjlhb9021a3iw3pr4a0913gp4h9k7r9r7z7lca3";
  };

  patches =
    [ ( substituteAll {
        src = ./nix-purity.patch;
        inherit libpcap;
        glibc = stdenv.gcc.libc;
      })
      ./nonpriv.patch
    ];

  postPatch = "rm -v include/linux/if_pppol2tp.h";

  buildInputs = [ libpcap ];

  postInstall = "chmod -v -R +rw $out";

  meta = {
    homepage = http://ppp.samba.org/;
    description = "Point-to-point implementation for Linux and Solaris";
    platforms = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.urkud ];
  };
}