caddy: 1.0.5 -> 2.0.0

Rename legacy v1 to `caddy1`
This commit is contained in:
Oleksii Filonenko 2020-05-08 22:23:33 +03:00 committed by Sylvain Fankhauser
parent 06d2d84519
commit 6322325a53
No known key found for this signature in database
GPG key ID: 4228AB9EC0612ADA
5 changed files with 48 additions and 52 deletions

View file

@ -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>.
'';
};
};

View file

@ -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;
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 ];
};
}

36
pkgs/servers/caddy/v1.nix Normal file
View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -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 {