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]: 4ccecb3e6d/debian/bsdextrautils.links
This commit is contained in:
Thomas Mühlbacher
2024-03-23 11:53:07 +01:00
committed by Bjørn Forsman
parent 1d7f5c818a
commit 70f855d67d

View File

@@ -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/*
'';