diff options
author | Anthony Roussel <anthony@roussel.dev> | 2023-11-14 11:01:27 +0100 |
---|---|---|
committer | Anthony Roussel <anthony@roussel.dev> | 2023-11-14 11:01:27 +0100 |
commit | bffc19bd18bebcba12e06bc8eba820f16bfe7bb2 (patch) | |
tree | a26fd6b06e43bd57fb69a68df00b39de9053d99b /pkgs/by-name/us | |
parent | 76c3be5e508ed4f33ed9f5449c84c59e1371ca0a (diff) | |
download | nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar.gz nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar.bz2 nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar.lz nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar.xz nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.tar.zst nixlib-bffc19bd18bebcba12e06bc8eba820f16bfe7bb2.zip |
usql: move to by-name
Diffstat (limited to 'pkgs/by-name/us')
-rw-r--r-- | pkgs/by-name/us/usql/package.nix | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/by-name/us/usql/package.nix b/pkgs/by-name/us/usql/package.nix new file mode 100644 index 000000000000..780be25a33b5 --- /dev/null +++ b/pkgs/by-name/us/usql/package.nix @@ -0,0 +1,80 @@ +{ lib +, fetchFromGitHub +, buildGoModule +, unixODBC +, icu +, nix-update-script +, testers +, usql +}: + +buildGoModule rec { + pname = "usql"; + version = "0.15.2"; + + src = fetchFromGitHub { + owner = "xo"; + repo = "usql"; + rev = "v${version}"; + hash = "sha256-SJypezOTQr+TiG/rePXxgjrspeErqj6qw9TBen41e4Q="; + }; + + buildInputs = [ unixODBC icu ]; + + vendorHash = "sha256-i2lH6ajRmfJHsh7nzCjt7mi3issA4kSBdG42w67pOC4="; + proxyVendor = true; + + # Exclude broken genji, hive & impala drivers (bad group) + # These drivers break too often and are not used. + # + # See https://github.com/xo/usql/pull/347 + # + excludedPackages = [ + "genji" + "hive" + "impala" + ]; + + # These tags and flags are copied from build-release.sh + tags = [ + "most" + "sqlite_app_armor" + "sqlite_fts5" + "sqlite_introspect" + "sqlite_json1" + "sqlite_math_functions" + "sqlite_stat4" + "sqlite_userauth" + "sqlite_vtable" + "sqlite_icu" + "no_adodb" + ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/xo/usql/text.CommandVersion=${version}" + ]; + + # All the checks currently require docker instances to run the databases. + doCheck = false; + + passthru = { + updateScript = nix-update-script { }; + tests.version = testers.testVersion { + inherit version; + package = usql; + command = "usql --version"; + }; + }; + + meta = with lib; { + description = "Universal command-line interface for SQL databases"; + homepage = "https://github.com/xo/usql"; + changelog = "https://github.com/xo/usql/releases/tag/v${version}"; + license = licenses.mit; + mainProgram = "usql"; + maintainers = with maintainers; [ georgyo anthonyroussel ]; + platforms = with platforms; linux ++ darwin; + }; +} |