From 1c327386b4934dd76d0deae5d7d350050553b23a Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Fri, 18 Oct 2024 15:15:16 +0800 Subject: [PATCH 1/2] maintainers: add DictXiong --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c069e9b2494c..e6aefc68fa59 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5495,6 +5495,12 @@ githubId = 15774340; name = "Thomas Depierre"; }; + DictXiong = { + email = "me@beardic.cn"; + github = "DictXiong"; + githubId = 41772157; + name = "Dict Xiong"; + }; diegolelis = { email = "diego.o.lelis@gmail.com"; github = "DiegoLelis"; From 934cf4cdea4c8790f93278232027d9ebcfc5b0c7 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Fri, 18 Oct 2024 15:24:08 +0800 Subject: [PATCH 2/2] rpPPPoE: 3.12 -> 4.0 and build kernel mode plugin The old rpPPPoE package from Roaring Penguin is no longer maintained and the download link is also inaccessible. So I switch the upstream to https://github.com/dfskoll/rp-pppoe. Also, according to the discussions in https://github.com/dfskoll/rp-pppoe/issues/32, it is strongly recommended to use rpPPPoE in the kernel mode, as it is more stable and performant than in the user mode. So I enable the compilation of the kernel mode plugin `rp-pppoe.so`. It will be available at `/run/current-system/sw/lib/rp-pppoe.so`. --- pkgs/by-name/rp/rpPPPoE/package.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/rp/rpPPPoE/package.nix b/pkgs/by-name/rp/rpPPPoE/package.nix index e58c25766810..6fd6c40ce308 100644 --- a/pkgs/by-name/rp/rpPPPoE/package.nix +++ b/pkgs/by-name/rp/rpPPPoE/package.nix @@ -1,13 +1,15 @@ -{ lib, stdenv, fetchurl, ppp } : +{ lib, stdenv, fetchFromGitHub, ppp } : let in stdenv.mkDerivation rec { pname = "rp-pppoe"; - version = "3.12"; + version = "4.0"; - src = fetchurl { - url = "https://www.roaringpenguin.com/files/download/rp-pppoe-${version}.tar.gz"; - sha256 = "1hl6rjvplapgsyrap8xj46kc9kqwdlm6ya6gp3lv0ihm0c24wy80"; + src = fetchFromGitHub { + owner = "dfskoll"; + repo = "rp-pppoe"; + rev = version; + hash = "sha256-2y26FVxVn8sU9/E2yJeJmbhAeOB0Go7EUPMU9H58H6U="; }; buildInputs = [ ppp ]; @@ -17,11 +19,13 @@ stdenv.mkDerivation rec { export PPPD=${ppp}/sbin/pppd ''; - configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "rpppoe_cv_pack_bitfields=rev" ]; + configureFlags = [ "--enable-plugin=${ppp}/include" ] ++ 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@/etc/ppp/plugins@$(out)/lib@' sed -i Makefile -e 's@PPPOESERVER_PPPD_OPTIONS=@&$(out)@' + sed -i Makefile -e '/# Directory created by rp-pppoe for kernel-mode plugin/d' ''; makeFlags = [ "AR:=$(AR)" ]; @@ -29,7 +33,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Roaring Penguin Point-to-Point over Ethernet tool"; platforms = platforms.linux; - homepage = "https://www.roaringpenguin.com/products/pppoe"; + homepage = "https://github.com/dfskoll/rp-pppoe"; license = licenses.gpl2Plus; + maintainers = with maintainers; [ DictXiong ]; }; }