2022-09-14 18:05:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, tbls
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tbls";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.60.0";
|
2022-09-14 18:05:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "k1LoW";
|
|
|
|
repo = "tbls";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-5/YAJl01ARralsBEV6ZJqcYfMMudCmcQcdQD1jn1I+M=";
|
2022-09-14 18:05:37 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = "sha256-AeaTAjo1wRl7Ymg/fyoijaa9UXf9SiNR447WJtZeN5o=";
|
2022-09-14 18:05:37 +00:00
|
|
|
|
|
|
|
CGO_CFLAGS = [ "-Wno-format-security" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/k1LoW/tbls.commit=unspecified"
|
|
|
|
"-X github.com/k1LoW/tbls.date=unspecified"
|
|
|
|
"-X github.com/k1LoW/tbls.version=${src.rev}"
|
|
|
|
"-X github.com/k1LoW/tbls/version.Version=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Remove tests that require additional services.
|
|
|
|
rm -f \
|
|
|
|
datasource/datasource_test.go \
|
|
|
|
drivers/*/*_test.go
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = tbls;
|
|
|
|
command = "tbls version";
|
|
|
|
version = src.rev;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to generate documentation based on a database";
|
|
|
|
homepage = "https://github.com/k1LoW/tbls";
|
|
|
|
changelog = "https://github.com/k1LoW/tbls/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
|
|
|
};
|
|
|
|
}
|