mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
74d8a923cb
Diff: https://github.com/xyproto/tinyxxd/compare/v1.3.6...v1.3.7 A compatibility error with vim's xxd was reported and fixed: - https://github.com/xyproto/tinyxxd/issues/15
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
vim,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "tinyxxd";
|
|
version = "1.3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "tinyxxd";
|
|
owner = "xyproto";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Yj9n/reWAjKY1spXiW/fjPGTgj1Yc18FzFln6f5LK9c=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
postInstall = ''
|
|
installManPage tinyxxd.1
|
|
|
|
# Allow using `tinyxxd` as `xxd`. This is similar to the Arch packaging.
|
|
# https://gitlab.archlinux.org/archlinux/packaging/packages/tinyxxd/-/blob/main/PKGBUILD
|
|
ln -s $out/bin/{tiny,}xxd
|
|
ln -s $out/share/man/man1/{tiny,}xxd.1.gz
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/xyproto/tinyxxd";
|
|
description = "Drop-in replacement and standalone version of the hex dump utility that comes with ViM";
|
|
license = [
|
|
lib.licenses.mit # or
|
|
lib.licenses.gpl2Only
|
|
];
|
|
mainProgram = "tinyxxd";
|
|
maintainers = with lib.maintainers; [
|
|
emily
|
|
philiptaron
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
|
|
# If the two `xxd` providers are present, choose this one.
|
|
priority = (vim.xxd.meta.priority or lib.meta.defaultPriority) - 1;
|
|
};
|
|
})
|