nixpkgs/pkgs/tools/misc/mods/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
878 B
Nix
Raw Normal View History

2023-05-14 13:44:04 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
, gitUpdater
, testers
, mods
2023-05-14 13:44:04 +02:00
}:
buildGoModule rec {
pname = "mods";
version = "0.2.0";
2023-05-14 13:44:04 +02:00
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "mods";
rev = "v${version}";
hash = "sha256-jOvXT/KAfSN9E4ZgntCbTu05VJu1jhGtv6gEgLStd98=";
2023-05-14 13:44:04 +02:00
};
vendorHash = "sha256-GNGX8dyTtzRSUznEV/do1H7GEf6nYf0w+CLCZfkktfg=";
2023-05-14 13:44:04 +02:00
ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
passthru = {
updateScript = gitUpdater {
rev-prefix = "v";
ignoredVersions = ".(rc|beta).*";
};
tests.version = testers.testVersion {
package = mods;
command = "HOME=$(mktemp -d) mods -v";
};
};
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 ];
};
}