Adding ppp and rp-pppoe for different point-to-point connectivity situations. Not tested for trivial reasons, but built OK

svn path=/nixpkgs/trunk/; revision=13925
This commit is contained in:
Michael Raskin 2009-02-01 13:54:20 +00:00
parent f47649b3db
commit cdf5d243a0
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,41 @@
a :
let
fetchurl = a.fetchurl;
version = a.lib.getAttr ["version"] "2.4.4" a;
buildInputs = with a; [
];
in
rec {
src = fetchurl {
url = "http://ppp.samba.org/ftp/ppp/ppp-${version}.tar.gz";
sha256 = "1sli1s478k85vmjdbrqm39nn5r20x9qgg3a0lbp2dwz50zy4bbsq";
};
inherit buildInputs;
configureFlags = [];
phaseNames = ["exportVars" "patchPrivileged" "doConfigure" "doMakeInstall"];
exportVars = a.noDepEntry(''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -lcrypt "
'');
/* We want to run it as far as we can with our current permissions
For example, dependent builds would prefer to run --version
without ever using setuid pppd. We are not setuid anyway, so.. */
patchPrivileged = a.FullDepEntry(''
sed -e '/privileged =/aprivileged = 1;' -i pppd/main.c
sed -e '/SH DESCRIPTION/a WARNING: Patched version unsuitable to be setuid root' -i pppd/pppd.8
'') ["minInit" "doUnpack"];
passthru = {
inherit version;
};
name = "ppp-" + version;
meta = {
description = "Point-to-point implementation for Linux and Solaris";
};
}

View File

@ -0,0 +1,42 @@
a :
let
fetchurl = a.fetchurl;
version = a.lib.getAttr ["version"] "3.10" a;
buildInputs = with a; [
ppp
];
in
rec {
src = fetchurl {
url = "http://www.roaringpenguin.com/files/download/rp-pppoe-${version}.tar.gz";
sha256 = "1xj9rvsblvv2zi4n1bj8mkk00p1b24ch5hlr1gcc3b4l4m0ag73h";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["exportVars" "doConfigure" "patchInstall" "makeDirs" "doMakeInstall"];
goSrcDir = "cd src";
exportVars = a.noDepEntry(''
export PATH="$PATH:${a.ppp}/sbin"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -L${a.ppp}/lib/${a.ppp.version}"
export PPPD=${a.ppp}/sbin/pppd
'');
patchInstall = a.FullDepEntry(''
sed -i Makefile -e 's@DESTDIR)/etc/ppp@out)/share/${name}/etc/ppp@'
sed -i Makefile -e 's@PPPOESERVER_PPPD_OPTIONS=@&$(out)/share/${name}@'
'') ["minInit" "doUnpack"];
makeDirs = a.FullDepEntry(''
ensureDir $out/share/${name}/etc/ppp
'') ["minInit" "defEnsureDir"];
name = "rp-pppoe-" + version;
meta = {
description = "Roaring Penguin Point-to-Point over Ethernet tool";
};
}

View File

@ -1108,6 +1108,10 @@ let
inherit (xlibs) libX11;
};
/* WARNING: this version is unsuitable for using with a setuid wrapper */
ppp = builderDefsPackage (import ../tools/networking/ppp) {
};
proxychains = import ../tools/networking/proxychains {
inherit fetchurl stdenv;
};
@ -1167,6 +1171,10 @@ let
inherit builderDefs readline;
};
rpPPPoE = builderDefsPackage (import ../tools/networking/rp-pppoe) {
inherit ppp;
};
rpm = import ../tools/package-management/rpm {
inherit fetchurl stdenv cpio zlib bzip2 file sqlite beecrypt neon elfutils;
};