From 70f855d67da2de765e24df74549004bf3304465d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BChlbacher?= Date: Sat, 23 Mar 2024 11:53:07 +0100 Subject: [PATCH] util-linux: add hd symlink for hexdump --canonical As mentioned in the man page, `hd` is a shorthand for `hexdump --canonical`. Shell completion (at least in bash) works without any additional modifications. In nixpkgs, hd is offered by busybox but not util-linux so far. Other distros, such as Debian make hd available through a similar implementation[1]. [1]: https://salsa.debian.org/debian/util-linux/-/blob/4ccecb3e6d53fc7990d8287f9e00b3be6a64f209/debian/bsdextrautils.links --- pkgs/os-specific/linux/util-linux/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index af7a4f9f423a..4b44a19def89 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -109,6 +109,9 @@ stdenv.mkDerivation rec { ln -svf "$swap/bin/"* $bin/bin/ '' + '' + ln -svf "$bin/bin/hexdump" "$bin/bin/hd" + ln -svf "$man/share/man/man1/hexdump.1" "$man/share/man/man1/hd.1" + installShellCompletion --bash bash-completion/* '';