mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
hbrainfuck: migrate to by-name
This commit is contained in:
parent
2cc3e6e0fd
commit
e17698a07d
2 changed files with 33 additions and 15 deletions
33
nix/packages/by-name/hbrainfuck/package.nix
Normal file
33
nix/packages/by-name/hbrainfuck/package.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
|
@ -38,21 +38,6 @@ in rec {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# my repositories
|
|
||||||
hbrainfuck = mkHaskellPackage {
|
|
||||||
name = "hbrainfuck";
|
|
||||||
src = sources.hbrainfuck;
|
|
||||||
apply = infuse {
|
|
||||||
__output.nativeBuildInputs.__append = [pkgs.installShellFiles];
|
|
||||||
__output.postInstall.__append = ''
|
|
||||||
installShellCompletion --cmd hbrainfuck \
|
|
||||||
--bash <("$out/bin/hbrainfuck" --bash-completion-script "$out/bin/hbrainfuck") \
|
|
||||||
--fish <("$out/bin/hbrainfuck" --fish-completion-script "$out/bin/hbrainfuck") \
|
|
||||||
--zsh <("$out/bin/hbrainfuck" --zsh-completion-script "$out/bin/hbrainfuck")
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
prop-solveur = mkHaskellPackage {
|
prop-solveur = mkHaskellPackage {
|
||||||
name = "prop-solveur";
|
name = "prop-solveur";
|
||||||
src = sources.prop_solveur;
|
src = sources.prop_solveur;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue