xh: modernize, adopt (#409911)

authored by Felix Bargfeldt and committed by GitHub 1a022584 bbe6163a

+12 -4
+12 -4
pkgs/by-name/xh/xh/package.nix
··· 7 7 withNativeTls ? true, 8 8 stdenv, 9 9 openssl, 10 + versionCheckHook, 11 + nix-update-script, 10 12 }: 11 13 12 - rustPlatform.buildRustPackage rec { 14 + rustPlatform.buildRustPackage (finalAttrs: { 13 15 pname = "xh"; 14 16 version = "0.24.1"; 15 17 16 18 src = fetchFromGitHub { 17 19 owner = "ducaale"; 18 20 repo = "xh"; 19 - rev = "v${version}"; 21 + tag = "v${finalAttrs.version}"; 20 22 hash = "sha256-2c96O5SL6tcPSbxx8NYxG8LDX3ZgyxEMmEeJnKDwb38="; 21 23 }; 22 24 ··· 59 61 $out/bin/xhs --help > /dev/null 60 62 ''; 61 63 64 + nativeInstallCheckInputs = [ versionCheckHook ]; 65 + versionCheckProgramArg = "--version"; 66 + 67 + passthru.updateScript = nix-update-script { }; 68 + 62 69 meta = { 63 70 description = "Friendly and fast tool for sending HTTP requests"; 64 71 homepage = "https://github.com/ducaale/xh"; 65 - changelog = "https://github.com/ducaale/xh/blob/v${version}/CHANGELOG.md"; 72 + changelog = "https://github.com/ducaale/xh/blob/v${finalAttrs.version}/CHANGELOG.md"; 66 73 license = lib.licenses.mit; 67 74 maintainers = with lib.maintainers; [ 68 75 figsoda 69 76 aaronjheng 77 + defelo 70 78 ]; 71 79 mainProgram = "xh"; 72 80 }; 73 - } 81 + })