Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / by-name / us / usql / package.nix
blob2faeda9b09b9b94671ff974a5d5fe07af72ce13b
1 { lib
2 , fetchFromGitHub
3 , buildGoModule
4 , unixODBC
5 , icu
6 , nix-update-script
7 , testers
8 , usql
9 }:
11 buildGoModule rec {
12   pname = "usql";
13   version = "0.16.0";
15   src = fetchFromGitHub {
16     owner = "xo";
17     repo = "usql";
18     rev = "v${version}";
19     hash = "sha256-XfzCJOr0lOkimUKbOW0+qFNQMmYc0DBgi+0ItmEOjwE=";
20   };
22   buildInputs = [ unixODBC icu ];
24   vendorHash = "sha256-sijt6YOp1pFNhaxLIOLH90Z5ODVbWFj/mp8Csx8n+ac=";
25   proxyVendor = true;
27   # Exclude broken genji, hive & impala drivers (bad group)
28   # These drivers break too often and are not used.
29   #
30   # See https://github.com/xo/usql/pull/347
31   #
32   excludedPackages = [
33     "genji"
34     "hive"
35     "impala"
36   ];
38   # These tags and flags are copied from build.sh
39   tags = [
40     "most"
41     "sqlite_app_armor"
42     "sqlite_fts5"
43     "sqlite_introspect"
44     "sqlite_json1"
45     "sqlite_math_functions"
46     "sqlite_stat4"
47     "sqlite_userauth"
48     "sqlite_vtable"
49     "no_adodb"
50   ];
52   ldflags = [
53     "-s"
54     "-w"
55     "-X github.com/xo/usql/text.CommandVersion=${version}"
56   ];
58   # All the checks currently require docker instances to run the databases.
59   doCheck = false;
61   passthru = {
62     updateScript = nix-update-script { };
63     tests.version = testers.testVersion {
64       inherit version;
65       package = usql;
66       command = "usql --version";
67     };
68   };
70   meta = with lib; {
71     description = "Universal command-line interface for SQL databases";
72     homepage = "https://github.com/xo/usql";
73     changelog = "https://github.com/xo/usql/releases/tag/v${version}";
74     license = licenses.mit;
75     mainProgram = "usql";
76     maintainers = with maintainers; [ georgyo anthonyroussel ];
77     platforms = with platforms; linux ++ darwin;
78   };