3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/ppp/default.nix
Vladimír Čunát ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00

42 lines
1 KiB
Nix

{ stdenv, fetchurl, substituteAll, libpcap }:
stdenv.mkDerivation rec {
version = "2.4.7";
name = "ppp-${version}";
src = fetchurl {
url = "mirror://samba/ppp/${name}.tar.gz";
sha256 = "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02";
};
patches =
[ ( substituteAll {
src = ./nix-purity.patch;
inherit libpcap;
glibc = stdenv.cc.libc.dev or stdenv.cc.libc;
})
# Without nonpriv.patch, pppd --version doesn't work when not run as
# root.
./nonpriv.patch
];
buildInputs = [ libpcap ];
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"
'';
meta = {
homepage = https://ppp.samba.org/;
description = "Point-to-point implementation for Linux and Solaris";
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.falsifian ];
};
}