Skip to content

Commit

Permalink
hexpatch: init at 1.9.4 (#369642)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Dec 31, 2024
2 parents 6af97ac + 65c8af3 commit b8daf78
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions pkgs/by-name/he/hexpatch/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
fetchFromGitHub,
rustPlatform,
cmake,
python3,
versionCheckHook,
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
pname = "hexpatch";
version = "1.9.4";

src = fetchFromGitHub {
owner = "Etto48";
repo = "HexPatch";
tag = "v${version}";
hash = "sha256-tVJp8ZFHaHM6Yhty0n5W4ZDKG/L5+8ZcbbTnw2yLEOI=";
};

cargoHash = "sha256-oKZjLS4+blGMt3K6in4i7JLqKZ8uWAv/uBFU9VT0Ha8=";

nativeBuildInputs = [
cmake
python3
];

postFixup = ''
ln -s $out/bin/hex-patch $out/bin/hexpatch
'';

nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;

passthru = {
upateScript = nix-update-script { };
};

meta = {
description = "Binary patcher and editor written in Rust with a terminal user interface";
longDescription = ''
HexPatch is a binary patcher and editor with a terminal user interface (TUI),
capable of disassembling instructions and assembling patches. It supports a
variety of architectures and file formats, and can edit remote files
via SSH.
'';
homepage = "https://etto48.github.io/HexPatch/";
changelog = "https://github.com/Etto48/HexPatch/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ratcornu ];
mainProgram = "hexpatch";
};
}

0 comments on commit b8daf78

Please sign in to comment.