biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / by-name / us / usql / package.nix
bloba91319183f00eae79d42829d3508a57328517b74
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.19.3";
15   src = fetchFromGitHub {
16     owner = "xo";
17     repo = "usql";
18     rev = "v${version}";
19     hash = "sha256-VenqDYkBJ4XJ2zV7kaVvwlgDyCaTY77zQ5hPq5cOZKg=";
20   };
22   buildInputs = [ unixODBC icu ];
24   vendorHash = "sha256-KdLUxgNGMkkWBhUpXSecu0m3fsKl7Qj8Aw3z8WcdnSs=";
25   proxyVendor = true;
27   # Exclude drivers from the bad group
28   # These drivers break too often and are not used.
29   #
30   excludedPackages = [
31     "impala"
32   ];
34   # These tags and flags are copied from build.sh
35   tags = [
36     "most"
37     "sqlite_app_armor"
38     "sqlite_fts5"
39     "sqlite_introspect"
40     "sqlite_json1"
41     "sqlite_math_functions"
42     "sqlite_stat4"
43     "sqlite_userauth"
44     "sqlite_vtable"
45     "no_adodb"
46   ];
48   ldflags = [
49     "-s"
50     "-w"
51     "-X github.com/xo/usql/text.CommandVersion=${version}"
52   ];
54   # All the checks currently require docker instances to run the databases.
55   doCheck = false;
57   passthru = {
58     updateScript = nix-update-script { };
59     tests.version = testers.testVersion {
60       inherit version;
61       package = usql;
62       command = "usql --version";
63     };
64   };
66   meta = with lib; {
67     description = "Universal command-line interface for SQL databases";
68     homepage = "https://github.com/xo/usql";
69     changelog = "https://github.com/xo/usql/releases/tag/v${version}";
70     license = licenses.mit;
71     mainProgram = "usql";
72     maintainers = with maintainers; [ georgyo anthonyroussel ];
73     platforms = with platforms; linux ++ darwin;
74   };