depot/third_party/nixpkgs/pkgs/tools/misc/mods/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

42 lines
878 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, gitUpdater
, testers
, mods
}:
buildGoModule rec {
pname = "mods";
version = "0.2.0";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "mods";
rev = "v${version}";
hash = "sha256-jOvXT/KAfSN9E4ZgntCbTu05VJu1jhGtv6gEgLStd98=";
};
vendorHash = "sha256-GNGX8dyTtzRSUznEV/do1H7GEf6nYf0w+CLCZfkktfg=";
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";
};
};
meta = with lib; {
description = "AI on the command line";
homepage = "https://github.com/charmbracelet/mods";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}