diff options
-rw-r--r-- | nixos/modules/services/web-servers/caddy.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/caddy/default.nix | 22 | ||||
-rw-r--r-- | pkgs/servers/caddy/v1.nix | 36 | ||||
-rw-r--r-- | pkgs/servers/caddy/v2.nix | 26 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
5 files changed, 48 insertions, 52 deletions
diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix index 65e9f12e6648f..e5f1df774bbcf 100644 --- a/nixos/modules/services/web-servers/caddy.nix +++ b/nixos/modules/services/web-servers/caddy.nix @@ -86,13 +86,13 @@ in { }; package = mkOption { - default = pkgs.caddy2; - defaultText = "pkgs.caddy2"; - example = "pkgs.caddy"; + default = pkgs.caddy; + defaultText = "pkgs.caddy"; + example = "pkgs.caddy1"; type = types.package; description = '' Caddy package to use. - To use Caddy v1 (obsolete), set this to <option>pkgs.caddy</option>. + To use Caddy v1 (obsolete), set this to <literal>pkgs.caddy1</literal>. ''; }; }; diff --git a/pkgs/servers/caddy/default.nix b/pkgs/servers/caddy/default.nix index 05b69c30e6ce8..5a7ac8f086f97 100644 --- a/pkgs/servers/caddy/default.nix +++ b/pkgs/servers/caddy/default.nix @@ -2,35 +2,25 @@ buildGoModule rec { pname = "caddy"; - version = "1.0.5"; + version = "2.0.0"; - subPackages = [ "caddy" ]; + subPackages = [ "cmd/caddy" ]; src = fetchFromGitHub { owner = "caddyserver"; repo = pname; rev = "v${version}"; - sha256 = "0jrhwmr6gggppskg5h450wybzkv17iq69dgw36hd1dp56q002i7g"; + sha256 = "1c1frfx0qkprhf4var70cncvrw8s9gjag2hygndbd9055hb52bvv"; }; - vendorSha256 = "09vnci9pp8zp7bvn8zj68wslz2nc54nhcd0ll31sqfjbp00215mj"; - doCheck = false; + vendorSha256 = "09vnci9pp8zp7bvn8zj68wslz2nc54nhcd0ll31sqfjbp00215mj"; - preBuild = '' - cat << EOF > caddy/main.go - package main - import "github.com/caddyserver/caddy/caddy/caddymain" - func main() { - caddymain.EnableTelemetry = false - caddymain.Run() - } - EOF - ''; + modSha256 = "19sxyvfq1bpg85w8cd1yk2s6rd8759cf2zqs5b6wyny4cak2bl83"; meta = with stdenv.lib; { homepage = "https://caddyserver.com"; description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; license = licenses.asl20; - maintainers = with maintainers; [ rushmorem fpletz zimbatm filalex77 ]; + maintainers = with maintainers; [ filalex77 ]; }; } diff --git a/pkgs/servers/caddy/v1.nix b/pkgs/servers/caddy/v1.nix new file mode 100644 index 0000000000000..bcd4b7065b587 --- /dev/null +++ b/pkgs/servers/caddy/v1.nix @@ -0,0 +1,36 @@ +{ stdenv, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "caddy"; + version = "1.0.5"; + + goPackagePath = "github.com/caddyserver/caddy"; + + subPackages = [ "caddy" ]; + + src = fetchFromGitHub { + owner = "caddyserver"; + repo = pname; + rev = "v${version}"; + sha256 = "0jrhwmr6gggppskg5h450wybzkv17iq69dgw36hd1dp56q002i7g"; + }; + modSha256 = "1gc0xvsihr4zp7hkrdfrplvzkaphz1y4q53rgwn2jhd8s98l57an"; + + preBuild = '' + cat << EOF > caddy/main.go + package main + import "github.com/caddyserver/caddy/caddy/caddymain" + func main() { + caddymain.EnableTelemetry = false + caddymain.Run() + } + EOF + ''; + + meta = with stdenv.lib; { + homepage = "https://caddyserver.com"; + description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; + license = licenses.asl20; + maintainers = with maintainers; [ rushmorem fpletz zimbatm filalex77 ]; + }; +} diff --git a/pkgs/servers/caddy/v2.nix b/pkgs/servers/caddy/v2.nix deleted file mode 100644 index 4021e8298003f..0000000000000 --- a/pkgs/servers/caddy/v2.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: - -buildGoModule rec { - pname = "caddy"; - version = "2.1.1"; - - subPackages = [ "cmd/caddy" ]; - - src = fetchFromGitHub { - owner = "caddyserver"; - repo = pname; - rev = "v${version}"; - sha256 = "0c682zrivkawsxlps5hlx8js5zp4ddahg0zi5cr0861gnllbdll0"; - }; - - vendorSha256 = "0jzx00c2b8y7zwl73r2fh1826spcd15y39nfzr53s5lay3fvkybc"; - - doCheck = false; - - meta = with stdenv.lib; { - homepage = "https://caddyserver.com"; - description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS"; - license = licenses.asl20; - maintainers = with maintainers; [ filalex77 ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a5414477e9d0..dba9d0c793b75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1507,12 +1507,8 @@ in ''; }); - caddy = callPackage ../servers/caddy { - buildGoModule = buildGo114Module; - }; - caddy2 = callPackage ../servers/caddy/v2.nix { - buildGoModule = buildGo114Module; - }; + caddy = callPackage ../servers/caddy { }; + caddy1 = callPackage ../servers/caddy/v1.nix { }; traefik = callPackage ../servers/traefik { }; calamares = libsForQt5.callPackage ../tools/misc/calamares { |