Last active
March 3, 2024 23:40
-
-
Save Denperidge/33808b90cb06128e8b1998804b266801 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, config, ... }: | |
with pkgs; stdenv.mkDerivation rec { | |
pname = "caddy"; | |
version = "2.6.2"; | |
dontUnpack = true; | |
nativeBuildInputs = [ git go xcaddy ]; | |
configurePhase = '' | |
export GOCACHE=$TMPDIR/go-cache | |
export GOPATH="$TMPDIR/go" | |
''; | |
buildPhase = '' | |
runHook preBuild | |
${xcaddy}/bin/xcaddy build "v${version}" --with github.com/caddy-dns/porkbun | |
runHook postBuild | |
''; | |
installPhase = '' | |
runHook preInstall | |
mkdir -p $out/bin | |
mv caddy $out/bin | |
runHook postInstall | |
''; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment