2012-01-04 15:10:27 +00:00
|
|
|
{ stdenv, fetchurl, substituteAll, libpcap }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-02-08 01:43:49 +00:00
|
|
|
version = "2.4.7";
|
2012-01-04 19:04:09 +00:00
|
|
|
name = "ppp-${version}";
|
2009-02-01 13:54:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-08 21:29:27 +00:00
|
|
|
url = "mirror://samba/ppp/${name}.tar.gz";
|
2015-02-08 01:43:49 +00:00
|
|
|
sha256 = "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02";
|
2009-02-01 13:54:20 +00:00
|
|
|
};
|
|
|
|
|
2012-01-04 15:10:27 +00:00
|
|
|
patches =
|
|
|
|
[ ( substituteAll {
|
|
|
|
src = ./nix-purity.patch;
|
|
|
|
inherit libpcap;
|
2014-12-17 18:11:30 +00:00
|
|
|
glibc = stdenv.cc.libc;
|
2012-01-04 15:10:27 +00:00
|
|
|
})
|
2015-02-08 01:43:49 +00:00
|
|
|
# Without nonpriv.patch, pppd --version doesn't work when not run as
|
|
|
|
# root.
|
2012-01-04 15:10:27 +00:00
|
|
|
./nonpriv.patch
|
|
|
|
];
|
2009-02-01 13:54:20 +00:00
|
|
|
|
2012-01-04 15:10:27 +00:00
|
|
|
buildInputs = [ libpcap ];
|
2009-02-01 13:54:20 +00:00
|
|
|
|
2016-03-24 19:25:42 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
make install
|
|
|
|
install -D -m 755 scripts/{pon,poff,plog} $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/bin/{pon,poff,plog} --replace "/usr/sbin" "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2009-02-01 13:54:20 +00:00
|
|
|
meta = {
|
2015-02-08 01:43:49 +00:00
|
|
|
homepage = https://ppp.samba.org/;
|
2009-02-01 13:54:20 +00:00
|
|
|
description = "Point-to-point implementation for Linux and Solaris";
|
2012-01-04 15:10:27 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-02-08 19:29:14 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.falsifian ];
|
2009-02-01 13:54:20 +00:00
|
|
|
};
|
|
|
|
}
|