python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / tbls / default.nix
blobfff80b4fc1aec0d432b334ee8c2f1d47683c2154
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , testers
5 , tbls
6 }:
8 buildGoModule rec {
9   pname = "tbls";
10   version = "1.56.8";
12   src = fetchFromGitHub {
13     owner = "k1LoW";
14     repo = "tbls";
15     rev = "v${version}";
16     hash = "sha256-ARqWLm2EEqeV3/VxjSRTXoXywrmQLLGxHab4H6+JMpg=";
17   };
19   vendorHash = "sha256-pmnSeQHZEtsshldfq6D/r5pMYA5ivMWkzjOq2/WseYU=";
21   CGO_CFLAGS = [ "-Wno-format-security" ];
23   ldflags = [
24     "-s"
25     "-w"
26     "-X github.com/k1LoW/tbls.commit=unspecified"
27     "-X github.com/k1LoW/tbls.date=unspecified"
28     "-X github.com/k1LoW/tbls.version=${src.rev}"
29     "-X github.com/k1LoW/tbls/version.Version=${src.rev}"
30   ];
32   preCheck = ''
33     # Remove tests that require additional services.
34     rm -f \
35        datasource/datasource_test.go \
36        drivers/*/*_test.go
37   '';
39   passthru.tests.version = testers.testVersion {
40     package = tbls;
41     command = "tbls version";
42     version = src.rev;
43   };
45   meta = with lib; {
46     description = "A tool to generate documentation based on a database";
47     homepage = "https://github.com/k1LoW/tbls";
48     changelog = "https://github.com/k1LoW/tbls/blob/${src.rev}/CHANGELOG.md";
49     license = licenses.mit;
50     maintainers = with maintainers; [ azahi ];
51   };