Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / databricks-connect / default.nix
blob7deca5f47152ac74069bb2ffc00b729d4dc67ee0
1 { lib
2 , jdk8
3 , buildPythonPackage
4 , fetchPypi
5 , six
6 , py4j
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "databricks-connect";
12   version = "11.3.6";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchPypi {
18     inherit pname version;
19     hash = "sha256-kAUBA9V1st5UxXihrXQjyk+1ahsum/VEcNfDK1he/Pc=";
20   };
22   sourceRoot = ".";
24   propagatedBuildInputs = [ py4j six jdk8 ];
26   # requires network access
27   doCheck = false;
29   prePatch = ''
30     substituteInPlace setup.py \
31       --replace "py4j==0.10.9" "py4j"
32   '';
34   preFixup = ''
35     substituteInPlace "$out/bin/find-spark-home" \
36       --replace find_spark_home.py .find_spark_home.py-wrapped
37   '';
39   pythonImportsCheck = [ "pyspark" "six" "py4j" ];
41   meta = with lib; {
42     description = "Client for connecting to remote Databricks clusters";
43     homepage = "https://pypi.org/project/databricks-connect";
44     sourceProvenance = with sourceTypes; [ binaryBytecode ];
45     license = licenses.databricks;
46     maintainers = with maintainers; [ kfollesdal ];
47   };