mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
39 lines
937 B
Nix
39 lines
937 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
let
|
|
srcInfo = lib.importJSON ./src.json;
|
|
in
|
|
|
|
buildGoModule rec {
|
|
pname = "chroma";
|
|
version = "2.8.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;
|
|
};
|
|
|
|
vendorHash = "sha256-Bol5yMvNYuoVnSjEgf3h6X4CeUooy2Hpdy3SCaNXXOE=";
|
|
|
|
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 = "General purpose syntax highlighter in pure Go";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
mainProgram = "chroma";
|
|
};
|
|
}
|