aaaaa
This commit is contained in:
parent
414e830efa
commit
d3a93fd115
35 changed files with 1832 additions and 228 deletions
45
packages/caddy-desec.nix
Normal file
45
packages/caddy-desec.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, caddy, buildGoModule, stdenv, xcaddy, cacert, git, go, ... }:
|
||||
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
|
||||
git
|
||||
go
|
||||
];
|
||||
|
||||
plugins = [
|
||||
"github.com/caddy-dns/desec@v1.0.1"
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
export GOCACHE=$TMPDIR/go-cache
|
||||
export GOPATH="$TMPDIR/go"
|
||||
export XCADDY_SKIP_BUILD=1
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
${xcaddy}/bin/xcaddy build "${lib.last (lib.splitString "/" caddy.src.rev)}" ${lib.concatMapStringsSep " " (plugin: "--with ${plugin}") plugins}
|
||||
cd buildenv*
|
||||
go mod vendor
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r --reflink=auto . $out
|
||||
'';
|
||||
|
||||
outputHash = "sha256-r4+WK8UhGLAuIvdV6uiH2bMh/SjTfY4CzKcpHU0Gu5s=";
|
||||
outputHashMode = "recursive";
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
ldflags = [ "-s" "-w" ]; ## don't include version info twice
|
||||
vendorHash = null;
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue