add pppoe derivation, replacing override
we use a custom installPhase so we don't drag in a bunch of scripts that we don't need and don't work
This commit is contained in:
parent
af4cd2e05c
commit
e2650aa162
2 changed files with 47 additions and 9 deletions
10
overlay.nix
10
overlay.nix
|
@ -12,15 +12,7 @@ final: prev: {
|
||||||
s6-init-bin = final.callPackage ./pkgs/s6-init-bin {};
|
s6-init-bin = final.callPackage ./pkgs/s6-init-bin {};
|
||||||
s6-rc-database = final.callPackage ./pkgs/s6-rc-database {};
|
s6-rc-database = final.callPackage ./pkgs/s6-rc-database {};
|
||||||
|
|
||||||
pppoe = prev.rpPPPoE.overrideAttrs (o: {
|
pppoe = final.callPackage ./pkgs/pppoe {};
|
||||||
# use newer rp-pppoe, it builds cleanly
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "dfskoll";
|
|
||||||
repo = "rp-pppoe";
|
|
||||||
rev = "7cfd8c0405d14cf1c8d799d41d8207fd707979c1";
|
|
||||||
hash = "sha256-MFdCwNj8c52blxEuXH5ltT2yYDmKMH5MLUgtddZV25E=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
ppp =
|
ppp =
|
||||||
(prev.ppp.override {
|
(prev.ppp.override {
|
||||||
libpcap = null;
|
libpcap = null;
|
||||||
|
|
46
pkgs/pppoe/default.nix
Normal file
46
pkgs/pppoe/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, ppp } :
|
||||||
|
let
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "rp-pppoe";
|
||||||
|
version = "3.15";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "dfskoll";
|
||||||
|
repo = "rp-pppoe";
|
||||||
|
rev = "7cfd8c0405d14cf1c8d799d41d8207fd707979c1";
|
||||||
|
hash = "sha256-MFdCwNj8c52blxEuXH5ltT2yYDmKMH5MLUgtddZV25E=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ppp ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
cd src
|
||||||
|
export PPPD=${ppp}/sbin/pppd
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "rpppoe_cv_pack_bitfields=rev" ];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
sed -i Makefile -e 's@DESTDIR)/etc/ppp@out)/etc/ppp@'
|
||||||
|
sed -i Makefile -e 's@PPPOESERVER_PPPD_OPTIONS=@&$(out)@'
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin $out/lib
|
||||||
|
cp pppoe pppoe-server $out/bin # ppoe-relay pppoe-sniff?
|
||||||
|
test -e rp-pppoe.so && cp rp-pppoe.so $out/lib
|
||||||
|
true
|
||||||
|
'';
|
||||||
|
makeFlags = [ "AR:=$(AR)" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Roaring Penguin Point-to-Point over Ethernet tool";
|
||||||
|
platforms = platforms.linux;
|
||||||
|
homepage = "https://www.roaringpenguin.com/products/pppoe";
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue