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