Skip to content

Commit 8cfac77

Browse files
committed
goshs: init at 1.0.2
1 parent 3aabb0b commit 8cfac77

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

pkgs/by-name/go/goshs/package.nix

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
buildGoModule,
3+
fetchFromGitHub,
4+
gitUpdater,
5+
stdenv,
6+
versionCheckHook,
7+
lib,
8+
}:
9+
10+
buildGoModule (finalAttrs: {
11+
pname = "goshs";
12+
version = "1.0.2";
13+
14+
src = fetchFromGitHub {
15+
owner = "patrickhener";
16+
repo = "goshs";
17+
tag = "v${finalAttrs.version}";
18+
hash = "sha256-xq9BqWhUZfk4p5C6d5Eqh98bs0ZDTjpy5KnvhV/9Jew=";
19+
};
20+
21+
vendorHash = "sha256-ECh0K3G6VAAJihqzzlWaEQclfXa0Wp/eFL16ABa7r+0=";
22+
23+
ldflags = [
24+
"-s"
25+
"-w"
26+
];
27+
28+
nativeInstallCheckInputs = [ versionCheckHook ];
29+
doInstallCheck = true;
30+
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
31+
# utils_test.go:62: route ip+net: no such network interface
32+
# does not work in sandbox even with __darwinAllowLocalNetworking
33+
"-skip=^TestGetIPv4Addr$"
34+
];
35+
36+
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
37+
38+
meta = {
39+
description = "Simple, yet feature-rich web server written in Go";
40+
homepage = "https://goshs.de";
41+
changelog = "https://github.com/patrickhener/goshs/releases/tag/v${finalAttrs.version}";
42+
license = lib.licenses.mit;
43+
maintainers = with lib.maintainers; [
44+
fab
45+
matthiasbeyer
46+
seiarotg
47+
];
48+
mainProgram = "goshs";
49+
};
50+
})

0 commit comments

Comments
 (0)