diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 63ccff0fe2e6..a75d140dab39 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18590,8 +18590,6 @@ with pkgs; flags = [ "python" "X11" ]; # only flag "X11" by now }); - xxd = callPackage ../tools/misc/xxd { }; - vimNox = lowPrio (vim_configurable.override { source = "vim-nox"; lua = pkgs.lua5_1; # vimNox source is from 2012, requires older lua @@ -21816,7 +21814,7 @@ with pkgs; unixtools = recurseIntoAttrs (callPackages ./unix-tools.nix { }); inherit (unixtools) hexdump ps logger eject umount mount wall hostname more sysctl getconf - getent locale killall; + getent locale killall xxd; fts = if hostPlatform.isMusl then netbsd.fts else null; diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix index a46d2897f4ed..cc6a8e0592a8 100644 --- a/pkgs/top-level/unix-tools.nix +++ b/pkgs/top-level/unix-tools.nix @@ -16,6 +16,7 @@ let singleBinary = cmd: providers: let provider = "${lib.getBin providers.${hostPlatform.parsed.kernel.name}}/bin/${cmd}"; + manpage = "${lib.getOutput "man" providers.${hostPlatform.parsed.kernel.name}}/share/man/man1/${cmd}.1.gz"; in runCommand "${cmd}-${version}" { meta.platforms = map (n: { kernel.name = n; }) (pkgs.lib.attrNames providers); } '' @@ -25,6 +26,10 @@ let fi install -D "${provider}" "$out/bin/${cmd}" + + if [ -f "${manpage}" ]; then + install -D "${manpage}" $out/share/man/man1/${cmd}.1.gz + fi ''; # more is unavailable in darwin @@ -147,6 +152,10 @@ let linux = pkgs.utillinux; darwin = pkgs.darwin.basic_cmds; }; + xxd = { + linux = pkgs.vim; + darwin = pkgs.vim; + }; }; makeCompat = name': value: buildEnv {