Unverified Commit 7b7c9a4f authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

goshs: 2.0.3 -> 2.0.5 (#514135)

parents 0b73b3c7 0766bbf4
Loading
Loading
Loading
Loading
+9 −26
Original line number Diff line number Diff line
{
  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";