From 0766bbf46d79418744cf0609db49dfb1042abd59 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 27 Apr 2026 20:56:28 +0200 Subject: [PATCH] goshs: 2.0.3 -> 2.0.5 Changelog: https://github.com/patrickhener/goshs/releases/tag/refs/tags/v2.0.5 --- pkgs/by-name/go/goshs/package.nix | 35 ++++++++----------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/pkgs/by-name/go/goshs/package.nix b/pkgs/by-name/go/goshs/package.nix index b9780b24c745..efb7401fc322 100644 --- a/pkgs/by-name/go/goshs/package.nix +++ b/pkgs/by-name/go/goshs/package.nix @@ -1,40 +1,27 @@ { + lib, + stdenv, buildGoModule, fetchFromGitHub, - stdenv, - lib, - fetchpatch, - testers, - - # passthru - goshs, + versionCheckHook, }: buildGoModule (finalAttrs: { pname = "goshs"; - version = "2.0.3"; + version = "2.0.5"; src = fetchFromGitHub { owner = "patrickhener"; repo = "goshs"; tag = "v${finalAttrs.version}"; - hash = "sha256-DdGzX1qVz8mA+T9l+V2n7r6ngtV1moypT3sLO7f4OcY="; + hash = "sha256-OrEPu+1wJy2+LM6bFyjtfVlm2l9S0Gagao8tGn0amzY="; }; - patches = [ - # Fixes the build for 2.0.3 - (fetchpatch { - url = "https://github.com/patrickhener/goshs/commit/dc4a86e846b5a2e6f7cc97a29a73367dea26f91a.patch"; - hash = "sha256-yXVBxOAp37yVdI5JlFMzSuSwiUaF2gWOfy4GfBVkGSI="; - }) - ]; + vendorHash = "sha256-u98v5pYhwCQb4tTDNNC7V1F9f5Dih92cYmS3hOEWJPw="; - vendorHash = "sha256-R0U/cytan8U9nE/qYHmDUlUfIYhZAcjV2v/uIlZPTCs="; + ldflags = [ "-s" ]; - ldflags = [ - "-s" - "-w" - ]; + nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; @@ -51,11 +38,7 @@ buildGoModule (finalAttrs: { "-skip=^TestGetIPv4Addr$" ]; - passthru.tests.version = testers.testVersion { - package = goshs; - command = "goshs -v"; - version = "goshs ${finalAttrs.version}"; - }; + versionCheckProgramArg = [ "-v" ]; meta = { description = "Simple, yet feature-rich web server written in Go";