Install aliae
This commit is contained in:
parent
44199d02bd
commit
fb7bd9bd77
59
flake.nix
59
flake.nix
|
@ -78,6 +78,41 @@
|
|||
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
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
|
@ -91,7 +126,7 @@
|
|||
];
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
packages = (builtins.mapAttrs (name: packageDefinition: pkgs.callPackage packageDefinition { }) packageDefinitions) // {
|
||||
rcloneDocs =
|
||||
let
|
||||
module = lib.evalModules {
|
||||
|
@ -109,10 +144,6 @@
|
|||
pkgs.runCommand "options-doc.md" {} ''
|
||||
cat ${optionsDoc.optionsCommonMark} >> $out
|
||||
'';
|
||||
xone = xonePatcher {
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
inherit (pkgs.linuxPackages_latest) xone;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShellNoCC (
|
||||
|
@ -139,12 +170,18 @@
|
|||
}
|
||||
) // {
|
||||
overlays.default =
|
||||
final: prev: {
|
||||
linuxPackages_latest.xone = xonePatcher {
|
||||
inherit (final) fetchFromGitHub;
|
||||
inherit (final.linuxPackages_latest) xone;
|
||||
};
|
||||
};
|
||||
final: prev: (
|
||||
{
|
||||
linuxPackages_latest.xone = packageDefinitions.xone final;
|
||||
} //
|
||||
(lib.attrsets.concatMapAttrs (
|
||||
name: package:
|
||||
if name == "xone"
|
||||
then {}
|
||||
else {
|
||||
${name} = package final;
|
||||
})
|
||||
packageDefinitions));
|
||||
|
||||
nixosConfigurations =
|
||||
builtins.mapAttrs (
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
aliae
|
||||
powershell
|
||||
neofetch
|
||||
tldr
|
||||
|
|
Loading…
Reference in a new issue