liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (1127B)


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