2015-09-15 06:27:19 +02:00
|
|
|
a @ {ppp, ...} :
|
|
|
|
let
|
2009-02-01 14:54:20 +01:00
|
|
|
fetchurl = a.fetchurl;
|
|
|
|
|
2013-12-16 00:03:15 +01:00
|
|
|
version = a.lib.attrByPath ["version"] "3.11" a;
|
2009-02-01 14:54:20 +01:00
|
|
|
buildInputs = with a; [
|
2015-09-15 06:27:19 +02:00
|
|
|
ppp
|
2009-02-01 14:54:20 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.roaringpenguin.com/files/download/rp-pppoe-${version}.tar.gz";
|
2013-12-16 00:03:15 +01:00
|
|
|
sha256 = "083pfjsb8w7afqgygbvgndwajgwkfmcnqla5vnk4z9yf5zcs98c6";
|
2009-02-01 14:54:20 +01: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-20 01:25:58 +02:00
|
|
|
patchInstall = a.fullDepEntry(''
|
2009-02-01 14:54:20 +01: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 01:25:58 +02:00
|
|
|
makeDirs = a.fullDepEntry(''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/${name}/etc/ppp
|
2009-02-01 14:54:20 +01:00
|
|
|
'') ["minInit" "defEnsureDir"];
|
|
|
|
|
|
|
|
name = "rp-pppoe-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Roaring Penguin Point-to-Point over Ethernet tool";
|
|
|
|
};
|
|
|
|
}
|