Files
nicknb d1dd7e6eb0 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]: https://github.com/bensadeh/circumflex/commit/56d20830bb
[1]: https://github.com/bensadeh/circumflex/commit/59d0206652
2026-06-23 02:40:49 +02:00

45 lines
1005 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "circumflex";
version = "4.3";
src = fetchFromGitHub {
owner = "bensadeh";
repo = "circumflex";
tag = finalAttrs.version;
hash = "sha256-VyUJ7qiaodLTdfGyh3/tLGfNVZCAxImxOuz4ztaaqtg=";
};
vendorHash = "sha256-4YL0N8wA8igveYfeL4uZDY5YD1InW0iD3WWq1E/vIJs=";
nativeBuildInputs = [
installShellFiles
];
excludedPackages = [
"gen-completions"
];
postInstall = ''
installManPage share/man/clx.1
installShellCompletion --bash share/completions/clx.bash
installShellCompletion --fish share/completions/clx.fish
installShellCompletion --zsh share/completions/_clx
'';
meta = {
description = "Command line tool for browsing Hacker News in your terminal";
homepage = "https://github.com/bensadeh/circumflex";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ mktip ];
mainProgram = "clx";
};
})