Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21751,6 +21751,11 @@
github = "sei40kr";
githubId = 11665236;
};
seiarotg = {
name = "SEIAROTg";
github = "SEIAROTg";
githubId = 3611446;
};
seineeloquenz = {
name = "Alexander Linder";
github = "SeineEloquenz";
Expand Down
50 changes: 50 additions & 0 deletions pkgs/by-name/go/goshs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
buildGoModule,
fetchFromGitHub,
gitUpdater,
stdenv,
versionCheckHook,
lib,
}:

buildGoModule (finalAttrs: {
pname = "goshs";
version = "1.0.2";

src = fetchFromGitHub {
owner = "patrickhener";
repo = "goshs";
tag = "v${finalAttrs.version}";
hash = "sha256-xq9BqWhUZfk4p5C6d5Eqh98bs0ZDTjpy5KnvhV/9Jew=";
};

vendorHash = "sha256-ECh0K3G6VAAJihqzzlWaEQclfXa0Wp/eFL16ABa7r+0=";

ldflags = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these ldflags?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two flags disable symbol generation and DWARF generation respectively and are AFAICT fairly standard for release-build Go packages. No need to strip them out later if we never generate them to begin with

"-s"
"-w"
];

nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
# utils_test.go:62: route ip+net: no such network interface
# does not work in sandbox even with __darwinAllowLocalNetworking
"-skip=^TestGetIPv4Addr$"
];

passthru.updateScript = gitUpdater { rev-prefix = "v"; };

meta = {
description = "Simple, yet feature-rich web server written in Go";
homepage = "https://goshs.de";
changelog = "https://github.com/patrickhener/goshs/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
fab
matthiasbeyer
seiarotg
];
mainProgram = "goshs";
};
})