OOKNET                             [ /  search the index  ]  
──────────────────────────────────────────────────────────────────────────────────────
══════════════════════════════════════════════════════════════════════════════════════
OOKNET   [ /  search  ]  
────────────────────────────────────────────────
════════════════════════════════════════════════
 
 
main @ 46 LINES
 
[ HISTORY ]  [ UP ]
 

{
  buildGoModule,
  cacert,
  go,
  lib,
  stdenv,
  xcaddy,
  caddy,
}:
caddy.override {
  buildGoModule = args:
    buildGoModule (args
      // {
        src = stdenv.mkDerivation rec {
          pname = "caddy-using-xcaddy-${xcaddy.version}";
          inherit (caddy) version;
          dontUnpack = true;
          dontFixup = true;
          nativeBuildInputs = [cacert go];
          plugins = [
            "github.com/WeidiDeng/caddy-cloudflare-ip"
          ];
          configurePhase = ''
            export GOCACHE=$TMPDIR/go-cache
            export GOPATH="$TMPDIR/go"
            export XCADDY_SKIP_BUILD=1
          '';
          buildPhase = ''
            ${xcaddy}/bin/xcaddy build "${caddy.src.rev}" ${
              lib.concatMapStringsSep " " (plugin: "--with ${plugin}") plugins
            }
            cd buildenv*
            go mod vendor
          '';
          installPhase = ''
            cp -r --reflink=auto . $out
          '';
          outputHash = "sha256-7FlCaHLuyESq+0YAkud7y83hY4oow7omJPTVVweEnJI=";
          outputHashMode = "recursive";
        };
        subPackages = ["."];
        ldflags = ["-s" "-w"];
        vendorHash = null;
      });
}

{
  buildGoModule,
  cacert,
  go,
  lib,
  stdenv,
  xcaddy,
  caddy,
}:
caddy.override {
  buildGoModule = args:
    buildGoModule (args
      // {
        src = stdenv.mkDerivation rec {
          pname = "caddy-using-xcaddy-${xcad
dy.version}";
          inherit (caddy) version;
          dontUnpack = true;
          dontFixup = true;
          nativeBuildInputs = [cacert go];
          plugins = [
            "github.com/WeidiDeng/caddy-clou
dflare-ip"
          ];
          configurePhase = ''
            export GOCACHE=$TMPDIR/go-cache
            export GOPATH="$TMPDIR/go"
            export XCADDY_SKIP_BUILD=1
          '';
          buildPhase = ''
            ${xcaddy}/bin/xcaddy build "${ca
ddy.src.rev}" ${
              lib.concatMapStringsSep " " (p
lugin: "--with ${plugin}") plugins
            }
            cd buildenv*
            go mod vendor
          '';
          installPhase = ''
            cp -r --reflink=auto . $out
          '';
          outputHash = "sha256-7FlCaHLuyESq+
0YAkud7y83hY4oow7omJPTVVweEnJI=";
          outputHashMode = "recursive";
        };
        subPackages = ["."];
        ldflags = ["-s" "-w"];
        vendorHash = null;
      });
}
 
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET