mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
33 lines
953 B
Nix
33 lines
953 B
Nix
{
|
|
haskellPackages,
|
|
haskell,
|
|
fetchFromGitea,
|
|
installShellFiles,
|
|
}: let
|
|
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
|
|
|
drv =
|
|
haskellPackages.callCabal2nix "hbrainfuck"
|
|
(fetchFromGitea {
|
|
domain = "git.confusedcompiler.org";
|
|
owner = "leana8959";
|
|
repo = "hbrainfuck";
|
|
rev = "796aae9bdb222e8e0431627eb11a3e3a71c1ffef";
|
|
hash = "sha256-4OQ//QGzuPeOe1Zi9IjttUu4vLKufPCWXJzBk9v5zXc=";
|
|
})
|
|
{};
|
|
|
|
cabalOverrides = o: {
|
|
buildTools = o.buildTools or [] ++ [installShellFiles];
|
|
postInstall =
|
|
o.postInstall or ""
|
|
+ ''
|
|
installShellCompletion --cmd hbrainfuck \
|
|
--bash <("$out/bin/hbf" --bash-completion-script "$out/bin/hbf") \
|
|
--fish <("$out/bin/hbf" --fish-completion-script "$out/bin/hbf") \
|
|
--zsh <("$out/bin/hbf" --zsh-completion-script "$out/bin/hbf")
|
|
'';
|
|
};
|
|
in
|
|
justStaticExecutables
|
|
(overrideCabal cabalOverrides drv)
|