2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, python3
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-09-30 11:47:45 +00:00
|
|
|
pname = "databricks-sql-cli";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.3.3";
|
|
|
|
pyproject = true;
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "databricks";
|
|
|
|
repo = "databricks-sql-cli";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-wmwXw1o+pRsRjA7ai9x5o1el7mNBqM6xlGrvw0IqfMo=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pandas"
|
|
|
|
"databricks-sql-connector"
|
|
|
|
"sqlparse"
|
|
|
|
"numpy"
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
cli-helpers
|
|
|
|
click
|
|
|
|
configobj
|
2022-09-30 11:47:45 +00:00
|
|
|
databricks-sql-connector
|
2023-03-15 16:39:30 +00:00
|
|
|
pandas
|
|
|
|
prompt-toolkit
|
2022-09-30 11:47:45 +00:00
|
|
|
pygments
|
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI for querying Databricks SQL";
|
2024-09-19 14:19:46 +00:00
|
|
|
mainProgram = "dbsqlcli";
|
2022-09-30 11:47:45 +00:00
|
|
|
homepage = "https://github.com/databricks/databricks-sql-cli";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/databricks/databricks-sql-cli/releases/tag/v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = licenses.databricks;
|
|
|
|
maintainers = with maintainers; [ kfollesdal ];
|
|
|
|
};
|
|
|
|
}
|