2015-09-15 04:27:19 +00:00
|
|
|
a @ {ppp, ...} :
|
|
|
|
let
|
2009-02-01 13:54:20 +00:00
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2013-12-15 23:03:15 +00:00
|
|
|
version = a.lib.attrByPath ["version"] "3.11" a;
|
2009-02-01 13:54:20 +00:00
|
|
|
buildInputs = with a; [
|
2015-09-15 04:27:19 +00:00
|
|
|
ppp
|
2009-02-01 13:54:20 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.roaringpenguin.com/files/download/rp-pppoe-${version}.tar.gz";
|
2013-12-15 23:03:15 +00:00
|
|
|
sha256 = "083pfjsb8w7afqgygbvgndwajgwkfmcnqla5vnk4z9yf5zcs98c6";
|
2009-02-01 13:54:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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-19 23:25:58 +00: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-19 23:25:58 +00: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";
|
|
|
|
};
|
|
|
|
}
|