From cb62326e36148b60a95898b26c07ab221209cf9a Mon Sep 17 00:00:00 2001 From: Ivar Scholten Date: Sun, 11 Sep 2022 19:14:17 +0200 Subject: [PATCH] hex: init at 0.4.2 Fixes #190768 --- pkgs/tools/misc/hex/default.nix | 34 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/misc/hex/default.nix diff --git a/pkgs/tools/misc/hex/default.nix b/pkgs/tools/misc/hex/default.nix new file mode 100644 index 000000000000..618fbe1dda60 --- /dev/null +++ b/pkgs/tools/misc/hex/default.nix @@ -0,0 +1,34 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, testers +, hex +}: + +rustPlatform.buildRustPackage rec { + pname = "hex"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "sitkevij"; + repo = "hex"; + rev = "v${version}"; + hash = "sha256-mxKjiciejnOTbSkCzOWdAtysRAnEv4JgntPS1qM9og8="; + }; + + cargoHash = "sha256-kGe6XN03V+ILnlAcT0E8BvrYMa7ub05STFsFY6X5Gkk="; + + passthru.tests.version = testers.testVersion { + package = hex; + version = "hx ${version}"; + }; + + meta = with lib; { + description = "Futuristic take on hexdump, made in Rust"; + homepage = "https://github.com/sitkevij/hex"; + changelog = "https://github.com/sitkevij/hex/releases/tag/v${version}"; + mainProgram = "hx"; + license = licenses.mit; + maintainers = with maintainers; [ ivar ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 389f5cff4ecc..85891f45135f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7445,6 +7445,8 @@ with pkgs; hevea = callPackage ../tools/typesetting/hevea { }; + hex = callPackage ../tools/misc/hex { }; + hexd = callPackage ../tools/misc/hexd { }; pixd = callPackage ../tools/misc/pixd { };