nixpkgs/pkgs/applications/misc/databricks-sql-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

2022-09-07 13:30:40 +00:00
{ lib
, fetchFromGitHub
, fetchpatch
2023-03-14 10:55:11 +00:00
, python3
2022-09-07 13:30:40 +00:00
}:
2023-03-14 10:55:11 +00:00
python3.pkgs.buildPythonApplication rec {
2022-09-07 13:30:40 +00:00
pname = "databricks-sql-cli";
version = "0.1.4";
format = "pyproject";
src = fetchFromGitHub {
owner = "databricks";
repo = "databricks-sql-cli";
rev = "refs/tags/v${version}";
hash = "sha256-gr7LJfnvIu2Jf1XgILqfZoi8CbXeQyq0g1wLEBa5TPM=";
2022-09-07 13:30:40 +00:00
};
patches = [
# https://github.com/databricks/databricks-sql-cli/pull/38
(fetchpatch {
url = "https://github.com/databricks/databricks-sql-cli/commit/fc294e00819b6966f1605e5c1ce654473510aefe.patch";
sha256 = "sha256-QVrb7mD0fVbHrbrDywI6tsFNYM19x74LY8rhqqC8szE=";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'python = ">=3.7.1,<4.0"' 'python = ">=3.8,<4.0"' \
2023-03-14 10:55:11 +00:00
--replace 'pandas = "1.3.4"' 'pandas = "~1.5"'
2022-09-07 13:30:40 +00:00
'';
2023-03-14 10:55:11 +00:00
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
2022-09-07 13:30:40 +00:00
2023-03-14 10:55:11 +00:00
propagatedBuildInputs = with python3.pkgs; [
cli-helpers
click
configobj
2022-09-07 13:30:40 +00:00
databricks-sql-connector
2023-03-14 10:55:11 +00:00
pandas
prompt-toolkit
2022-09-07 13:30:40 +00:00
pygments
sqlparse
];
2023-03-14 10:55:11 +00:00
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
2022-09-07 13:30:40 +00:00
meta = with lib; {
description = "CLI for querying Databricks SQL";
homepage = "https://github.com/databricks/databricks-sql-cli";
changelog = "https://github.com/databricks/databricks-sql-cli/releases/tag/v${version}";
2022-09-07 13:30:40 +00:00
license = licenses.databricks;
maintainers = with maintainers; [ kfollesdal ];
};
}