xh: modernize, adopt (#409911)

This commit is contained in:
Felix Bargfeldt
2025-05-25 00:02:17 +02:00
committed by GitHub
+12 -4
View File
@@ -7,16 +7,18 @@
withNativeTls ? true,
stdenv,
openssl,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "xh";
version = "0.24.1";
src = fetchFromGitHub {
owner = "ducaale";
repo = "xh";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-2c96O5SL6tcPSbxx8NYxG8LDX3ZgyxEMmEeJnKDwb38=";
};
@@ -59,15 +61,21 @@ rustPlatform.buildRustPackage rec {
$out/bin/xhs --help > /dev/null
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = {
description = "Friendly and fast tool for sending HTTP requests";
homepage = "https://github.com/ducaale/xh";
changelog = "https://github.com/ducaale/xh/blob/v${version}/CHANGELOG.md";
changelog = "https://github.com/ducaale/xh/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
aaronjheng
defelo
];
mainProgram = "xh";
};
}
})