mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: move my projects to packages
This commit is contained in:
parent
a5b5dda488
commit
53bad14001
6 changed files with 120 additions and 246 deletions
|
|
@ -12,6 +12,21 @@
|
|||
final: _:
|
||||
let
|
||||
mkNerdFont = final.callPackage self.lib.mkNerdFont { };
|
||||
|
||||
mkHaskellPackage =
|
||||
{
|
||||
source,
|
||||
name,
|
||||
trans ? lib.id,
|
||||
}:
|
||||
let
|
||||
drv = final.haskellPackages.callCabal2nix name source { };
|
||||
in
|
||||
lib.pipe drv [
|
||||
trans
|
||||
final.haskell.lib.dontHaddock
|
||||
final.haskell.lib.justStaticExecutables
|
||||
];
|
||||
in
|
||||
lib.fix (ps: {
|
||||
# fonts
|
||||
|
|
@ -85,6 +100,73 @@
|
|||
ffgun = final.callPackage ./ffgun.nix { };
|
||||
easyscan = final.callPackage ./easyscan.nix { };
|
||||
|
||||
# my repositories
|
||||
hbf = mkHaskellPackage {
|
||||
name = "hbrainfuck";
|
||||
source = final.fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "leana8959";
|
||||
repo = "hbrainfuck";
|
||||
rev = "81c1d0d7ef1595bda1f8e4d86592d06e33bfd422";
|
||||
hash = "sha256-NSCqJwcM5UgsAMpIpDSTy534hEK0wMicqwoE3DC8CGk=";
|
||||
};
|
||||
trans =
|
||||
p:
|
||||
p.overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.installShellFiles ];
|
||||
postInstall =
|
||||
(old.postInstall or "")
|
||||
+ ''
|
||||
installShellCompletion --cmd hbf \
|
||||
--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")
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
prop-solveur = mkHaskellPackage {
|
||||
name = "prop-solveur";
|
||||
source = final.fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "leana8959";
|
||||
repo = "prop_solveur";
|
||||
rev = "814082ed223f77f15484fcd62ab130c7c7ba1b17";
|
||||
hash = "sha256-YNl9n3T0NfPQxbkLo4WVbg9huwAxKy96jQJxzt77z2w=";
|
||||
};
|
||||
trans =
|
||||
p:
|
||||
p.overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final.installShellFiles ];
|
||||
postInstall =
|
||||
(old.postInstall or "")
|
||||
+ ''
|
||||
installShellCompletion --cmd prop-solveur \
|
||||
--bash <("$out/bin/prop-solveur" --bash-completion-script "$out/bin/prop-solveur") \
|
||||
--fish <("$out/bin/prop-solveur" --fish-completion-script "$out/bin/prop-solveur") \
|
||||
--zsh <("$out/bin/prop-solveur" --zsh-completion-script "$out/bin/prop-solveur")
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
audio-lint =
|
||||
let
|
||||
rev = "3ea38c85c5f6135958e51ad4ff13a96ccd68a21c";
|
||||
in
|
||||
final.rustPlatform.buildRustPackage rec {
|
||||
pname = "audio-lint";
|
||||
version = lib.substring 0 8 rev;
|
||||
src = final.fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "leana8959";
|
||||
repo = "audio-lint";
|
||||
inherit rev;
|
||||
hash = "sha256-h1SnWAh3FPL5GweOXVXXtp+swZApgecYaWjy7rM/J+w=";
|
||||
};
|
||||
|
||||
cargoLock.lockFile = "${src}/Cargo.lock";
|
||||
};
|
||||
|
||||
# Unmerged packages from nixfinal
|
||||
# TODO: use upstream when merged
|
||||
dl-librescore = final.callPackage ./dl-librescore.nix { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue