nix: add installable package

This commit is contained in:
2026-05-29 01:32:04 +09:00
parent 98c931563e
commit b5e608c597
3 changed files with 186 additions and 2 deletions
+15 -2
View File
@@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "INSOMNIA agent runtime";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
@@ -16,9 +16,22 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
insomnia = pkgs.callPackage ./package.nix { };
mkApp = name: description: {
type = "app";
program = "${insomnia}/bin/${name}";
meta.description = description;
};
in
{
packages.default = pkgs.callPackage ./package.nix { };
packages.default = insomnia;
packages.insomnia = insomnia;
apps.default = mkApp "tui" "Run the INSOMNIA terminal UI";
apps.tui = mkApp "tui" "Run the INSOMNIA terminal UI";
apps.pod = mkApp "pod" "Run the INSOMNIA Pod CLI";
checks.default = insomnia;
devShells.default = import ./devshell.nix { inherit pkgs; };
}