mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-08 07:11:06 +00:00
72 lines
1.8 KiB
Nix
72 lines
1.8 KiB
Nix
{
|
|
description = "Fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
systems.url = "github:nix-systems/default";
|
|
|
|
treefmt-nix = {
|
|
url = "github:numtide/treefmt-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
gomod2nix = {
|
|
url = "github:nix-community/gomod2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
systems,
|
|
treefmt-nix,
|
|
gomod2nix,
|
|
...
|
|
}:
|
|
let
|
|
forAllSystems = nixpkgs.lib.genAttrs (import systems);
|
|
|
|
treefmtEval = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
treefmt-nix.lib.evalModule pkgs ./treefmt.nix
|
|
);
|
|
in
|
|
{
|
|
formatter = forAllSystems (system: treefmtEval.${system}.config.build.wrapper);
|
|
|
|
checks = forAllSystems (system: {
|
|
formatting = treefmtEval.${system}.config.build.check self;
|
|
});
|
|
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
goEnv = gomod2nix.legacyPackages.${system}.mkGoEnv { pwd = ./.; };
|
|
in
|
|
import ./shell.nix {
|
|
inherit pkgs goEnv;
|
|
inherit (gomod2nix.legacyPackages.${system}) gomod2nix;
|
|
}
|
|
);
|
|
|
|
packages = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
default = self.packages.${system}.fabric;
|
|
fabric = pkgs.callPackage ./pkgs/fabric {
|
|
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|