mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-09 14:28:01 -05:00
## CHANGES - Add GOTOOLCHAIN=local to shell environment - Configure preBuild hook in fabric package - Wrap goimports with local toolchain setting - Wrap gofmt with local toolchain setting - Update treefmt module import structure - Add pkgs parameter to treefmt config - Create shell script wrappers for Go tools
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{
|
|
self,
|
|
lib,
|
|
buildGoApplication,
|
|
go,
|
|
installShellFiles,
|
|
}:
|
|
|
|
buildGoApplication {
|
|
pname = "fabric-ai";
|
|
version = import ./version.nix;
|
|
src = self;
|
|
pwd = self;
|
|
modules = ./gomod2nix.toml;
|
|
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
inherit go;
|
|
|
|
# Prevent Go from automatically downloading newer toolchains
|
|
preBuild = ''
|
|
export GOTOOLCHAIN=local
|
|
'';
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
postInstall = ''
|
|
installShellCompletion --zsh ./completions/_fabric
|
|
installShellCompletion --bash ./completions/fabric.bash
|
|
installShellCompletion --fish ./completions/fabric.fish
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
homepage = "https://github.com/danielmiessler/fabric";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
mainProgram = "fabric";
|
|
};
|
|
}
|