1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/pkgs/tools/networking/ppp/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

{ 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;
2016-03-11 15:12:39 +00:00
glibc = stdenv.cc.libc.dev or stdenv.cc.libc;
})
# Without nonpriv.patch, pppd --version doesn't work when not run as
# root.
./nonpriv.patch
2017-01-25 23:40:17 +00:00
(fetchurl {
name = "CVE-2015-3310.patch";
url = "https://anonscm.debian.org/git/collab-maint/pkg-ppp.git/plain/debian/patches/rc_mksid-no-buffer-overflow?h=debian/2.4.7-1%2b4";
sha256 = "1dk00j7bg9nfgskw39fagnwv1xgsmyv0xnkd6n1v5gy0psw0lvqh";
})
./musl-fix-headers.patch
];
buildInputs = [ libpcap ];
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 = ''
for tgt in pon poff plog; do
substituteInPlace "$out/bin/$tgt" --replace "/usr/sbin" "$out/bin"
done
2016-03-24 19:25:42 +00:00
'';
meta = {
homepage = https://ppp.samba.org/;
description = "Point-to-point implementation for Linux and Solaris";
platforms = stdenv.lib.platforms.linux;
2015-02-08 19:29:14 +00:00
maintainers = [ stdenv.lib.maintainers.falsifian ];
};
}