81047829ea
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
37 lines
915 B
Nix
37 lines
915 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
let
|
|
srcInfo = lib.importJSON ./src.json;
|
|
in
|
|
|
|
buildGoModule rec {
|
|
pname = "chroma";
|
|
version = "0.10.0";
|
|
|
|
# To update:
|
|
# nix-prefetch-git --rev v${version} https://github.com/alecthomas/chroma.git > src.json
|
|
src = fetchFromGitHub {
|
|
owner = "alecthomas";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
inherit (srcInfo) sha256;
|
|
};
|
|
|
|
vendorSha256 = "09b718vjd6npg850fr7z6srs2sc5vsr7byzlz5yb5qx0vm3ajxpf";
|
|
|
|
modRoot = "./cmd/chroma";
|
|
|
|
# substitute version info as done in goreleaser builds
|
|
ldflags = [
|
|
"-X" "main.version=${version}"
|
|
"-X" "main.commit=${srcInfo.rev}"
|
|
"-X" "main.date=${srcInfo.date}"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/alecthomas/chroma";
|
|
description = "A general purpose syntax highlighter in pure Go";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
};
|
|
}
|