2023-05-14 13:44:04 +02:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2023-05-18 02:34:05 +02:00
|
|
|
, gitUpdater
|
|
|
|
, testers
|
|
|
|
, mods
|
2023-05-14 13:44:04 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mods";
|
2023-07-04 07:06:13 +02:00
|
|
|
version = "0.2.0";
|
2023-05-14 13:44:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "charmbracelet";
|
|
|
|
repo = "mods";
|
|
|
|
rev = "v${version}";
|
2023-07-04 07:06:13 +02:00
|
|
|
hash = "sha256-jOvXT/KAfSN9E4ZgntCbTu05VJu1jhGtv6gEgLStd98=";
|
2023-05-14 13:44:04 +02:00
|
|
|
};
|
|
|
|
|
2023-07-04 07:06:13 +02:00
|
|
|
vendorHash = "sha256-GNGX8dyTtzRSUznEV/do1H7GEf6nYf0w+CLCZfkktfg=";
|
2023-05-14 13:44:04 +02:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
|
|
|
|
|
2023-05-18 02:34:05 +02:00
|
|
|
passthru = {
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
rev-prefix = "v";
|
|
|
|
ignoredVersions = ".(rc|beta).*";
|
|
|
|
};
|
|
|
|
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = mods;
|
2023-07-04 07:06:13 +02:00
|
|
|
command = "HOME=$(mktemp -d) mods -v";
|
2023-05-18 02:34:05 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-05-14 13:44:04 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "AI on the command line";
|
|
|
|
homepage = "https://github.com/charmbracelet/mods";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dit7ya ];
|
|
|
|
};
|
|
|
|
}
|