2023-01-07 18:38:14 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, gh-markdown-preview
|
|
|
|
, testers
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gh-markdown-preview";
|
2024-09-10 12:59:47 +00:00
|
|
|
version = "1.8.0";
|
2023-01-07 18:38:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yusukebe";
|
|
|
|
repo = "gh-markdown-preview";
|
|
|
|
rev = "v${version}";
|
2024-09-10 12:59:47 +00:00
|
|
|
hash = "sha256-y9AiHmBfDSJ6oCevUAUkg18qHe/oP7A6PLiz3MZqU0s=";
|
2023-01-07 18:38:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = "sha256-O6Q9h5zcYAoKLjuzGu7f7UZY0Y5rL2INqFyJT2QZJ/E=";
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/yusukebe/gh-markdown-preview/cmd.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests need network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion { package = gh-markdown-preview; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "gh extension to preview Markdown looking like on GitHub";
|
|
|
|
homepage = "https://github.com/yusukebe/gh-markdown-preview";
|
|
|
|
changelog = "https://github.com/yusukebe/gh-markdown-preview/releases/tag/${src.rev}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ amesgen ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "gh-markdown-preview";
|
2023-01-07 18:38:14 +00:00
|
|
|
};
|
|
|
|
}
|