mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
packages/ruler: add completions
This commit is contained in:
parent
df559db2fb
commit
e5d144ad4f
1 changed files with 16 additions and 2 deletions
|
|
@ -2,8 +2,9 @@
|
|||
haskellPackages,
|
||||
haskell,
|
||||
fetchFromGitea,
|
||||
installShellFiles,
|
||||
}: let
|
||||
inherit (haskell.lib.compose) justStaticExecutables;
|
||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||
|
||||
drv =
|
||||
haskellPackages.callCabal2nix "ruler"
|
||||
|
|
@ -15,5 +16,18 @@
|
|||
hash = "sha256-gWW5rcL3NI0BExEVqXL+avk7z1/4WYEwEwjtZjqSXNM=";
|
||||
})
|
||||
{};
|
||||
|
||||
cabalOverrides = o: {
|
||||
buildTools = o.buildTools or [] ++ [installShellFiles];
|
||||
postInstall =
|
||||
o.postInstall or ""
|
||||
+ ''
|
||||
installShellCompletion --cmd ruler \
|
||||
--bash <("$out/bin/ruler" --bash-completion-script "$out/bin/ruler") \
|
||||
--fish <("$out/bin/ruler" --fish-completion-script "$out/bin/ruler") \
|
||||
--zsh <("$out/bin/ruler" --zsh-completion-script "$out/bin/ruler")
|
||||
'';
|
||||
};
|
||||
in
|
||||
justStaticExecutables drv
|
||||
justStaticExecutables
|
||||
(overrideCabal cabalOverrides drv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue