Signal drop!
Relay (operand.online) is unreachable.
Usually, a dropped signal means an upgrade is happening. Hold on!
Sorry, no connección.
Hang in there while we get back on track
gram:build
> ./nixos/package/xcaddy.nix
Lenses
(coming soon!)
# https://mdleom.com/blog/2021/12/27/caddy-plugins-nixos/
{ pkgs, config, plugins, ... }: with pkgs; stdenv.mkDerivation rec {
pname = "caddy";
# https://github.com/NixOS/nixpkgs/issues/113520
version = "latest";
dontUnpack = true;
nativeBuildInputs = [ git go xcaddy ];
configurePhase = ''
export GOCACHE=$TMPDIR/go-cache
export GOPATH="$TMPDIR/go"
'';
buildPhase = let
pluginArgs = lib.concatMapStringsSep " " (plugin: "--with ${plugin}") plugins;
in ''
runHook preBuild
${xcaddy}/bin/xcaddy build latest ${pluginArgs}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv caddy $out/bin
runHook postInstall
'';
}