circumflex: install man page, shell completions; cleanup

Install the man page and shell completions.

Additional cleanup:

Remove less and ncurses from PATH. Upstream switched to a native
comments viewer which does not depend on either. See commits [0]
56d20830bb and [1] 59d0206652 respectively.

Skip building the 'gen-completions' package used for generating shell
completions. These are part of the source tree under share/ and can be
installed from there. This was, funnily enough, polluting the user
environment with a binary of the same name.

[0]: 56d20830bb
[1]: 59d0206652
This commit is contained in:
nicknb 2026-06-23 02:08:42 +02:00
commit d1dd7e6eb0
No known key found for this signature in database
GPG key ID: D90384C807BC1FE6

View file

@ -1,10 +1,8 @@
{
lib,
less,
ncurses,
buildGoModule,
fetchFromGitHub,
makeWrapper,
installShellFiles,
}:
buildGoModule (finalAttrs: {
@ -20,16 +18,20 @@ buildGoModule (finalAttrs: {
vendorHash = "sha256-4YL0N8wA8igveYfeL4uZDY5YD1InW0iD3WWq1E/vIJs=";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
installShellFiles
];
excludedPackages = [
"gen-completions"
];
postInstall = ''
wrapProgram $out/bin/clx \
--prefix PATH : ${
lib.makeBinPath [
less
ncurses
]
}
installManPage share/man/clx.1
installShellCompletion --bash share/completions/clx.bash
installShellCompletion --fish share/completions/clx.fish
installShellCompletion --zsh share/completions/_clx
'';
meta = {