restish: 2.0.0 -> 2.2.0 (#530428)

This commit is contained in:
Fabian Affolter
2026-06-10 18:40:49 +00:00
committed by GitHub
+24 -20
View File
@@ -3,27 +3,29 @@
stdenv,
buildGoModule,
fetchFromGitHub,
restish,
testers,
libxrandr,
libx11,
libxcursor,
libxi,
libxinerama,
libxcursor,
libx11,
libxrandr,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
buildGoModule (finalAttrs: {
pname = "restish";
version = "2.0.0";
version = "2.2.0";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "danielgtaylor";
repo = "restish";
tag = "v${finalAttrs.version}";
hash = "sha256-4piN0W/9y2NTsTuZ2B4Czhr9RQNb4eT9ZIX9MYzfMLI=";
hash = "sha256-wGchbKSEbzr1vQlYWgUTubA1xQVcxq7iyRUIuWqVL0Y=";
};
vendorHash = "sha256-ZRyGCdmPenOeLtFuj0howJH0rah05sPUuD7RH/c0LKI=";
vendorHash = "sha256-Y0GwgrkD09WAlmyI6Oe3Kw6L62E7QRTCIThZGXbbn74=";
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libx11
@@ -33,25 +35,27 @@ buildGoModule (finalAttrs: {
libxrandr
];
ldflags = [
"-s"
"-w"
"-X=main.version=${finalAttrs.version}"
nativeInstallCheckInputs = [
versionCheckHook
writableTmpDirAsHomeHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
ldflags = [
"-s"
"-X=github.com/rest-sh/restish/v2/internal/cli.Version=${finalAttrs.version}"
];
passthru.tests.version = testers.testVersion {
package = restish;
command = "HOME=$(mktemp -d) restish --version";
};
checkFlags = [
# Test requires network access and test with hard-coded version '2.0.0'
"-skip=TestAPISyncDiscoveryDoesNotSendAuthToCrossOriginLinkSpec|TestVersion$|TestVersionCommand"
];
doInstallCheck = true;
meta = {
description = "CLI tool for interacting with REST-ish HTTP APIs";
homepage = "https://rest.sh/";
changelog = "https://github.com/danielgtaylor/restish/releases/tag/v${finalAttrs.version}";
changelog = "https://github.com/danielgtaylor/restish/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "restish";