1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "hexyl";
11 version = "0.16.0";
12
13 src = fetchFromGitHub {
14 owner = "sharkdp";
15 repo = "hexyl";
16 tag = "v${version}";
17 hash = "sha256-TmFvv+jzOSM8kKCxBbUoDsUjKRPTplhWheVfIjS5nsY=";
18 };
19
20 cargoHash = "sha256-QjQoGtLF5BAxWFiLZZYCpwrYCdiVfvG/lAukCNZGsec=";
21
22 nativeInstallCheckInputs = [ versionCheckHook ];
23 doInstallCheck = true;
24 versionCheckProgramArg = "--version";
25
26 passthru.updateScript = nix-update-script { };
27
28 meta = {
29 description = "Command-line hex viewer";
30 longDescription = ''
31 `hexyl` is a simple hex viewer for the terminal. It uses a colored
32 output to distinguish different categories of bytes (NULL bytes,
33 printable ASCII characters, ASCII whitespace characters, other ASCII
34 characters and non-ASCII).
35 '';
36 homepage = "https://github.com/sharkdp/hexyl";
37 changelog = "https://github.com/sharkdp/hexyl/blob/v${version}/CHANGELOG.md";
38 license = with lib.licenses; [
39 asl20
40 mit
41 ];
42 maintainers = with lib.maintainers; [
43 dywedir
44 figsoda
45 SuperSandro2000
46 ];
47 mainProgram = "hexyl";
48 };
49}