nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 81 lines 1.6 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 unixODBC, 6 icu, 7 nix-update-script, 8 testers, 9 usql, 10}: 11 12buildGoModule rec { 13 pname = "usql"; 14 version = "0.20.8"; 15 16 src = fetchFromGitHub { 17 owner = "xo"; 18 repo = "usql"; 19 tag = "v${version}"; 20 hash = "sha256-oaimplnmNpr3nMGNmiXmE9L03SfifjfncI9ZPiJg6JI="; 21 }; 22 23 buildInputs = [ 24 unixODBC 25 icu 26 ]; 27 28 vendorHash = "sha256-bu9vU7rpq8sg5zHcmbOhdOkO18ci4dUErsLwip0j3Jo="; 29 proxyVendor = true; 30 31 # Exclude drivers from the bad group 32 # These drivers break too often and are not used. 33 # 34 excludedPackages = [ 35 "impala" 36 ]; 37 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_vtable" 48 "no_adodb" 49 ]; 50 51 ldflags = [ 52 "-s" 53 "-w" 54 "-X github.com/xo/usql/text.CommandVersion=${version}" 55 ]; 56 57 # All the checks currently require docker instances to run the databases. 58 doCheck = false; 59 60 passthru = { 61 updateScript = nix-update-script { }; 62 tests.version = testers.testVersion { 63 inherit version; 64 package = usql; 65 command = "usql --version"; 66 }; 67 }; 68 69 meta = { 70 description = "Universal command-line interface for SQL databases"; 71 homepage = "https://github.com/xo/usql"; 72 changelog = "https://github.com/xo/usql/releases/tag/v${version}"; 73 license = lib.licenses.mit; 74 mainProgram = "usql"; 75 maintainers = with lib.maintainers; [ 76 georgyo 77 anthonyroussel 78 ]; 79 platforms = with lib.platforms; linux ++ darwin; 80 }; 81}