default.nix (1117B)
1 { 2 lib, 3 stdenv, 4 fetchgit, 5 ppp, 6 }: 7 stdenv.mkDerivation rec { 8 pname = "rp-pppoe"; 9 version = "4.0-plus"; 10 11 src = fetchgit { 12 url = "https://codeberg.org/dskoll/rp-pppoe"; 13 rev = "3c0f6c02279881d723743023634b19b77a7d9f82"; 14 hash = "sha256-RUUbP5j2I2DERQ7RE8xj4Xt1FoQOanMRoMiB1H6Wrdw="; 15 # rev = "7cfd8c0405d14cf1c8d799d41d8207fd707979c1"; 16 # hash = "sha256-MFdCwNj8c52blxEuXH5ltT2yYDmKMH5MLUgtddZV25E="; 17 }; 18 19 buildInputs = [ ppp ]; 20 21 preConfigure = '' 22 cd src 23 export PPPD=${ppp}/sbin/pppd 24 ''; 25 26 postConfigure = '' 27 sed -i Makefile -e 's@DESTDIR)/etc/ppp@out)/etc/ppp@' 28 sed -i Makefile -e 's@PPPOESERVER_PPPD_OPTIONS=@&$(out)@' 29 ''; 30 31 installPhase = '' 32 mkdir -p $out/bin $out/lib 33 cp pppoe pppoe-server $out/bin # ppoe-relay pppoe-sniff? 34 test -e rp-pppoe.so && cp rp-pppoe.so $out/lib 35 true 36 ''; 37 makeFlags = [ "AR:=$(AR)" ]; 38 39 meta = with lib; { 40 description = "Roaring Penguin Point-to-Point over Ethernet tool"; 41 platforms = platforms.linux; 42 homepage = "https://www.roaringpenguin.com/products/pppoe"; 43 license = licenses.gpl2Plus; 44 }; 45 }