Merge pull request #189855 from harvidsen/python-databricks-sql-connector-init

authored by Sandro and committed by GitHub 7ad22ae4 f5f544d3

+124
+6
maintainers/maintainer-list.nix
··· 5235 5235 fingerprint = "3F35 E4CA CBF4 2DE1 2E90 53E5 03A6 E6F7 8693 6619"; 5236 5236 }]; 5237 5237 }; 5238 + harvidsen = { 5239 + email = "harvidsen@gmail.com"; 5240 + github = "harvidsen"; 5241 + githubId = 62279738; 5242 + name = "Håkon Arvidsen"; 5243 + }; 5238 5244 haslersn = { 5239 5245 email = "haslersn@fius.informatik.uni-stuttgart.de"; 5240 5246 github = "haslersn";
+64
pkgs/applications/misc/databricks-sql-cli/default.nix
··· 1 + { lib 2 + , buildPythonApplication 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , poetry-core 6 + , pandas 7 + , prompt-toolkit 8 + , databricks-sql-connector 9 + , pygments 10 + , configobj 11 + , sqlparse 12 + , cli-helpers 13 + , click 14 + , pytestCheckHook 15 + }: 16 + 17 + buildPythonApplication rec { 18 + pname = "databricks-sql-cli"; 19 + version = "0.1.4"; 20 + format = "pyproject"; 21 + 22 + src = fetchFromGitHub { 23 + owner = "databricks"; 24 + repo = "databricks-sql-cli"; 25 + rev = "v${version}"; 26 + sha256 = "sha256-gr7LJfnvIu2Jf1XgILqfZoi8CbXeQyq0g1wLEBa5TPM="; 27 + }; 28 + 29 + patches = [ 30 + # https://github.com/databricks/databricks-sql-cli/pull/38 31 + (fetchpatch { 32 + url = "https://github.com/databricks/databricks-sql-cli/commit/fc294e00819b6966f1605e5c1ce654473510aefe.patch"; 33 + sha256 = "sha256-QVrb7mD0fVbHrbrDywI6tsFNYM19x74LY8rhqqC8szE="; 34 + }) 35 + ]; 36 + 37 + postPatch = '' 38 + substituteInPlace pyproject.toml \ 39 + --replace 'python = ">=3.7.1,<4.0"' 'python = ">=3.8,<4.0"' \ 40 + --replace 'pandas = "1.3.4"' 'pandas = "~1.4"' 41 + ''; 42 + 43 + nativeBuildInputs = [ poetry-core ]; 44 + 45 + propagatedBuildInputs = [ 46 + prompt-toolkit 47 + pandas 48 + databricks-sql-connector 49 + pygments 50 + configobj 51 + sqlparse 52 + cli-helpers 53 + click 54 + ]; 55 + 56 + checkInputs = [ pytestCheckHook ]; 57 + 58 + meta = with lib; { 59 + description = "CLI for querying Databricks SQL"; 60 + homepage = "https://github.com/databricks/databricks-sql-cli"; 61 + license = licenses.databricks; 62 + maintainers = with maintainers; [ kfollesdal ]; 63 + }; 64 + }
+50
pkgs/development/python-modules/databricks-sql-connector/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , thrift 5 + , pandas 6 + , pyarrow 7 + , poetry-core 8 + , pytestCheckHook 9 + }: 10 + 11 + buildPythonPackage rec { 12 + pname = "databricks-sql-connector"; 13 + version = "2.0.5"; 14 + format = "pyproject"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "databricks"; 18 + repo = "databricks-sql-python"; 19 + rev = "v${version}"; 20 + sha256 = "sha256-Qpdyn6z1mbO4bzyUZ2eYdd9pfIkIP/Aj4YgNXaYwxpE="; 21 + }; 22 + 23 + postPatch = '' 24 + substituteInPlace pyproject.toml \ 25 + --replace 'thrift = "^0.13.0"' 'thrift = ">=0.13.0,<1.0.0"' 26 + ''; 27 + 28 + nativeBuildInputs = [ 29 + poetry-core 30 + ]; 31 + 32 + propagatedBuildInputs = [ 33 + thrift 34 + pandas 35 + pyarrow 36 + ]; 37 + 38 + checkInputs = [ 39 + pytestCheckHook 40 + ]; 41 + 42 + pytestFlagsArray = [ "tests/unit" ]; 43 + 44 + meta = with lib; { 45 + description = "Databricks SQL Connector for Python"; 46 + homepage = https://docs.databricks.com/dev-tools/python-sql-connector.html; 47 + license = licenses.asl20; 48 + maintainers = with maintainers; [ harvidsen ]; 49 + }; 50 + }
+2
pkgs/top-level/all-packages.nix
··· 428 428 429 429 cryptowatch-desktop = callPackage ../applications/finance/cryptowatch { }; 430 430 431 + databricks-sql-cli = python3Packages.callPackage ../applications/misc/databricks-sql-cli { }; 432 + 431 433 datalad = callPackage ../applications/version-management/datalad { 432 434 python3 = python39; # `boto` currently broken with Python3.10 433 435 };
+2
pkgs/top-level/python-packages.nix
··· 2260 2260 2261 2261 databricks-connect = callPackage ../development/python-modules/databricks-connect { }; 2262 2262 2263 + databricks-sql-connector = callPackage ../development/python-modules/databricks-sql-connector { }; 2264 + 2263 2265 dataclasses = callPackage ../development/python-modules/dataclasses { }; 2264 2266 2265 2267 dataclasses-json = callPackage ../development/python-modules/dataclasses-json { };