1{ lib
2, buildGoModule
3, fetchFromGitHub
4, gitUpdater
5, testers
6, mods
7}:
8
9buildGoModule rec {
10 pname = "mods";
11 version = "0.2.0";
12
13 src = fetchFromGitHub {
14 owner = "charmbracelet";
15 repo = "mods";
16 rev = "v${version}";
17 hash = "sha256-jOvXT/KAfSN9E4ZgntCbTu05VJu1jhGtv6gEgLStd98=";
18 };
19
20 vendorHash = "sha256-GNGX8dyTtzRSUznEV/do1H7GEf6nYf0w+CLCZfkktfg=";
21
22 ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
23
24 passthru = {
25 updateScript = gitUpdater {
26 rev-prefix = "v";
27 ignoredVersions = ".(rc|beta).*";
28 };
29
30 tests.version = testers.testVersion {
31 package = mods;
32 command = "HOME=$(mktemp -d) mods -v";
33 };
34 };
35
36 meta = with lib; {
37 description = "AI on the command line";
38 homepage = "https://github.com/charmbracelet/mods";
39 license = licenses.mit;
40 maintainers = with maintainers; [ dit7ya ];
41 };
42}