792b51d22f
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
47 lines
983 B
Nix
47 lines
983 B
Nix
{ lib
|
|
, jdk8
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, six
|
|
, py4j
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "databricks-connect";
|
|
version = "9.1.9";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-/I0yMrh2OinvSeMX8C10Y64FuD/nr3dOKIN3Pkb3Zrs=";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
propagatedBuildInputs = [ py4j six jdk8 ];
|
|
|
|
# requires network access
|
|
doCheck = false;
|
|
|
|
prePatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "py4j==0.10.9" "py4j"
|
|
'';
|
|
|
|
preFixup = ''
|
|
substituteInPlace "$out/bin/find-spark-home" \
|
|
--replace find_spark_home.py .find_spark_home.py-wrapped
|
|
'';
|
|
|
|
pythonImportsCheck = [ "pyspark" "six" "py4j" ];
|
|
|
|
meta = with lib; {
|
|
description = "Client for connecting to remote Databricks clusters";
|
|
homepage = "https://pypi.org/project/databricks-connect";
|
|
license = licenses.databricks;
|
|
maintainers = with maintainers; [ kfollesdal ];
|
|
};
|
|
}
|