2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gitUpdater
|
|
|
|
, testers
|
|
|
|
, mods
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mods";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.1.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "charmbracelet";
|
|
|
|
repo = "mods";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-ZWH3YuN1cmdw96/HVzsp1u70ziUfupUeBjJiNI5a538=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-PgaxqfgtwBYnzyL2F/OPJP1rdmLOtBCTKEPhMgvC6XA=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
ignoredVersions = ".(rc|beta).*";
|
|
|
|
};
|
|
|
|
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = mods;
|
2023-07-15 17:15:38 +00:00
|
|
|
command = "HOME=$(mktemp -d) mods -v";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "AI on the command line";
|
|
|
|
homepage = "https://github.com/charmbracelet/mods";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dit7ya ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "mods";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|