nixpkgs/pkgs/servers/caddy/default.nix

37 lines
915 B
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub }:
2016-06-05 10:43:36 +02:00
buildGoModule rec {
pname = "caddy";
2019-12-02 15:17:17 +01:00
version = "1.0.4";
2016-06-05 10:43:36 +02:00
2019-09-23 05:22:22 +02:00
goPackagePath = "github.com/caddyserver/caddy";
2016-06-05 10:43:36 +02:00
subPackages = [ "caddy" ];
2016-08-21 17:08:33 +02:00
src = fetchFromGitHub {
2019-09-23 05:22:22 +02:00
owner = "caddyserver";
repo = pname;
2016-09-21 18:52:17 +02:00
rev = "v${version}";
2019-12-02 15:17:17 +01:00
sha256 = "0mqbaa9cshrqm5fggm5l5nzcnv8c9dvylcc4z7qj3322vl5cpfdc";
2016-06-05 10:43:36 +02:00
};
2019-12-02 15:17:17 +01:00
modSha256 = "0f08smcnzmrj3v43v0qgyd11qwdbymbl86c9prais6sykgh1ld97";
2016-06-05 10:43:36 +02:00
preBuild = ''
cat << EOF > caddy/main.go
package main
import "github.com/caddyserver/caddy/caddy/caddymain"
func main() {
caddymain.EnableTelemetry = false
caddymain.Run()
}
EOF
'';
2016-09-21 18:52:17 +02:00
meta = with stdenv.lib; {
2019-12-02 15:18:23 +01:00
homepage = "https://caddyserver.com";
2016-09-21 18:52:17 +02:00
description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS";
license = licenses.asl20;
2019-12-02 15:18:23 +01:00
maintainers = with maintainers; [ rushmorem fpletz zimbatm filalex77 ];
2016-09-21 18:52:17 +02:00
};
2016-06-05 10:43:36 +02:00
}