{ buildGoModule, fetchFromGitHub, stdenv, versionCheckHook, lib, }: buildGoModule (finalAttrs: { pname = "goshs"; version = "1.1.1"; src = fetchFromGitHub { owner = "patrickhener"; repo = "goshs"; tag = "v${finalAttrs.version}"; hash = "sha256-MgWYbM48VbbmiY5mlDWnyU20/SPziHfZQXwNRZ435Mg="; }; vendorHash = "sha256-eu4ytWargmwSfCVfXPykCX0VD7XO7m/T8Her10XpM3s="; ldflags = [ "-s" "-w" ]; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; preCheck = '' # Possible race condition rm integration/integration_test.go # This is handled by nixpkgs rm update/update_test.go ''; 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$" ]; 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"; }; })