build: support pkg managers installation (#87)
closes #71, #84, #86 - AUR - Homebrew - Nix - Debian (.deb) - RPM (.rpm) - Aqua - ASDF This is my first time doing this, so there might be mistakes. If you can't download it through any pkg manager, please leave a comment or open an issue --------- Co-authored-by: use-the-fork <23747916+use-the-fork@users.noreply.github.com>
This commit is contained in:
@@ -1,52 +1,66 @@
|
||||
{
|
||||
description = "IRIS - Shell commands suggestion tool";
|
||||
|
||||
inputs = {
|
||||
systems.url = "github:nix-systems/default";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake
|
||||
{
|
||||
packages = forAllSystems (system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
in
|
||||
{
|
||||
iris = pkgs.buildGoModule {
|
||||
pname = "iris";
|
||||
version = self.shortRev or "dirty";
|
||||
src = ./.;
|
||||
inherit inputs;
|
||||
}
|
||||
(
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
systems = import inputs.systems;
|
||||
perSystem = {
|
||||
pkgs,
|
||||
self',
|
||||
...
|
||||
}: {
|
||||
packages = {
|
||||
iris = pkgs.buildGoModule {
|
||||
pname = "iris";
|
||||
version = self.shortRev or "dirty";
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
|
||||
subPackages = [ "cmd/iris" ];
|
||||
subPackages = ["cmd/iris"];
|
||||
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-kBSMhUsuCKIjAXjGfl1WSjCX+tlGi9BTnkRu9ScW6M0=";
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-kBSMhUsuCKIjAXjGfl1WSjCX+tlGi9BTnkRu9ScW6M0=";
|
||||
|
||||
doCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "A shell auto-completion tool that works like code editor's IntelliSense";
|
||||
homepage = "https://github.com/versenilvis/iris";
|
||||
license = licenses.mit;
|
||||
mainProgram = "iris";
|
||||
meta = with pkgs.lib; {
|
||||
description = "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool";
|
||||
homepage = "https://github.com/versenilvis/iris";
|
||||
license = licenses.mit;
|
||||
mainProgram = "iris";
|
||||
};
|
||||
};
|
||||
default = self'.packages.iris;
|
||||
};
|
||||
default = self.packages.${system}.iris;
|
||||
});
|
||||
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ go ];
|
||||
devShells.default = pkgs.mkShellNoCC {
|
||||
# Tell Direnv to shut up.
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
|
||||
packages = [
|
||||
# languages
|
||||
pkgs.go
|
||||
pkgs.pkl
|
||||
|
||||
# Tooling
|
||||
pkgs.hk
|
||||
pkgs.just
|
||||
pkgs.alejandra
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user