1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/servers/caddy/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2017-09-16 04:54:47 -04:00
{ stdenv, buildGoPackage, fetchFromGitHub, fetchpatch }:
2016-06-05 04:43:36 -04:00
2016-06-07 16:32:34 -04:00
buildGoPackage rec {
2016-06-05 04:43:36 -04:00
name = "caddy-${version}";
2017-09-16 04:54:47 -04:00
version = "0.10.9";
2016-06-05 04:43:36 -04:00
goPackagePath = "github.com/mholt/caddy";
subPackages = [ "caddy" ];
2016-08-21 11:08:33 -04:00
src = fetchFromGitHub {
owner = "mholt";
repo = "caddy";
2016-09-21 12:52:17 -04:00
rev = "v${version}";
2017-09-16 04:54:47 -04:00
sha256 = "1shry7dqcbb5d3hp9xz5l3jx9a6i18wssz3m28kpjf3cks427v55";
2016-06-05 04:43:36 -04:00
};
2017-09-16 04:54:47 -04:00
patches = [
# This header was added in 0.10.9 and was since reverted but no new release made
# remove this patch when updating to next release
(fetchpatch {
url = "https://github.com/mholt/caddy/commit/d267b62fe9fdd008f13774afc72d95335934d133.patch";
name = "revert-sponsors-header.patch";
sha256 = "192g23kzkrwgif7ii9c70mh1a25gwhm1l1mzyqm9i0d3jifsfc2j";
})
];
buildFlagsArray = ''
-ldflags=
2017-06-11 15:14:01 -04:00
-X github.com/mholt/caddy/caddy/caddymain.gitTag=v${version}
'';
2016-09-21 12:52:17 -04: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 12:52:17 -04:00
};
2016-06-05 04:43:36 -04:00
}