nixpkgs/pkgs/servers/caddy/default.nix

37 lines
903 B
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub }:
2016-06-05 09:43:36 +01:00
buildGoModule rec {
pname = "caddy";
2019-09-23 04:22:22 +01:00
version = "1.0.3";
2016-06-05 09:43:36 +01:00
2019-09-23 04:22:22 +01:00
goPackagePath = "github.com/caddyserver/caddy";
2016-06-05 09:43:36 +01:00
subPackages = [ "caddy" ];
2016-08-21 16:08:33 +01:00
src = fetchFromGitHub {
2019-09-23 04:22:22 +01:00
owner = "caddyserver";
repo = pname;
2016-09-21 17:52:17 +01:00
rev = "v${version}";
2019-09-23 04:22:22 +01:00
sha256 = "1n7i9w4vva5x5wry7gzkyfylk39x40ykv7ypf1ca3zbbk7w5x6mw";
2016-06-05 09:43:36 +01:00
};
2019-09-23 04:22:22 +01:00
modSha256 = "0np0mbs0mrn8scqa0dgvi7ya1707b3883prdaf1whsqrcr71ig8q";
2016-06-05 09:43:36 +01: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 17:52:17 +01:00
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 ];
2016-09-21 17:52:17 +01:00
};
2016-06-05 09:43:36 +01:00
}