Install aliae

This commit is contained in:
Manuel Thalmann 2024-05-09 13:58:36 +02:00
parent 44199d02bd
commit fb7bd9bd77
2 changed files with 49 additions and 11 deletions

View file

@ -78,6 +78,41 @@
sha256 = "lsfm7WDXTB6t05AI/pp17yZvkNvnM2WBMUHL1eVO6qw="; sha256 = "lsfm7WDXTB6t05AI/pp17yZvkNvnM2WBMUHL1eVO6qw=";
}; };
}); });
packageDefinitions = {
aliae = { buildGoModule, fetchFromGitHub, installShellFiles, ... }:
buildGoModule rec {
name = "aliae";
version = "0.21.0";
src = fetchFromGitHub {
owner = "JanDeDobbeleer";
repo = name;
rev = "v${version}";
sha256 = "Xg3fJs10euju26iJky5UGGGKov47Q16IZQP28ubNca0=";
};
nativeBuildInputs = [
installShellFiles
];
sourceRoot = "${src.name}/src";
vendorHash = "sha256-sXZ6Rdqy6VtYlQ3UoNWpgdri61b6aX+uAzLVa/y1lbU=";
postInstall = ''
mv $out/bin/{src,aliae}
installShellCompletion --cmd aliae \
--bash <($out/bin/aliae completion bash) \
--fish <($out/bin/aliae completion fish) \
--zsh <($out/bin/aliae completion zsh)
'';
};
xone = pkgs: xonePatcher {
inherit (pkgs) fetchFromGitHub;
inherit (pkgs.linuxPackages_latest) xone;
};
};
in in
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: system:
@ -91,7 +126,7 @@
]; ];
}; };
in { in {
packages = { packages = (builtins.mapAttrs (name: packageDefinition: pkgs.callPackage packageDefinition { }) packageDefinitions) // {
rcloneDocs = rcloneDocs =
let let
module = lib.evalModules { module = lib.evalModules {
@ -109,10 +144,6 @@
pkgs.runCommand "options-doc.md" {} '' pkgs.runCommand "options-doc.md" {} ''
cat ${optionsDoc.optionsCommonMark} >> $out cat ${optionsDoc.optionsCommonMark} >> $out
''; '';
xone = xonePatcher {
inherit (pkgs) fetchFromGitHub;
inherit (pkgs.linuxPackages_latest) xone;
};
}; };
devShells.default = pkgs.mkShellNoCC ( devShells.default = pkgs.mkShellNoCC (
@ -139,12 +170,18 @@
} }
) // { ) // {
overlays.default = overlays.default =
final: prev: { final: prev: (
linuxPackages_latest.xone = xonePatcher { {
inherit (final) fetchFromGitHub; linuxPackages_latest.xone = packageDefinitions.xone final;
inherit (final.linuxPackages_latest) xone; } //
}; (lib.attrsets.concatMapAttrs (
}; name: package:
if name == "xone"
then {}
else {
${name} = package final;
})
packageDefinitions));
nixosConfigurations = nixosConfigurations =
builtins.mapAttrs ( builtins.mapAttrs (

View file

@ -168,6 +168,7 @@
systemPackages = systemPackages =
with pkgs; with pkgs;
[ [
aliae
powershell powershell
neofetch neofetch
tldr tldr