2009-02-01 13:54:20 +00:00
|
|
|
a :
|
|
|
|
let
|
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2009-05-24 11:57:41 +01:00
|
|
|
version = a.lib.attrByPath ["version"] "3.10" a;
|
2009-02-01 13:54:20 +00:00
|
|
|
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
|
|
|
|
'');
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
patchInstall = a.fullDepEntry(''
|
2009-02-01 13:54:20 +00:00
|
|
|
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"];
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
makeDirs = a.fullDepEntry(''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/${name}/etc/ppp
|
2009-02-01 13:54:20 +00:00
|
|
|
'') ["minInit" "defEnsureDir"];
|
|
|
|
|
|
|
|
name = "rp-pppoe-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Roaring Penguin Point-to-Point over Ethernet tool";
|
|
|
|
};
|
|
|
|
}
|