79 lines
1.4 KiB
Nix
79 lines
1.4 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, asn1crypto
|
|
, azure-storage-blob
|
|
, boto3
|
|
, certifi
|
|
, cffi
|
|
, fetchPypi
|
|
, future
|
|
, idna
|
|
, ijson
|
|
, isPy3k
|
|
, oscrypto
|
|
, pyarrow
|
|
, pyasn1-modules
|
|
, pycryptodomex
|
|
, pyjwt
|
|
, pyopenssl
|
|
, pytz
|
|
, requests
|
|
, six
|
|
, urllib3
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "snowflake-connector-python";
|
|
version = "2.4.5";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "f5bd11228e192b4754587869ebd85752327ecb945fcc19c2ed1f66958443ad08";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
azure-storage-blob
|
|
asn1crypto
|
|
boto3
|
|
certifi
|
|
cffi
|
|
future
|
|
idna
|
|
ijson
|
|
oscrypto
|
|
pycryptodomex
|
|
pyjwt
|
|
pyopenssl
|
|
pytz
|
|
requests
|
|
six
|
|
pyarrow
|
|
pyasn1-modules
|
|
urllib3
|
|
];
|
|
|
|
postPatch = ''
|
|
# https://github.com/snowflakedb/snowflake-connector-python/issues/705
|
|
substituteInPlace setup.py \
|
|
--replace "idna>=2.5,<3" "idna" \
|
|
--replace "certifi<2021.0.0" "certifi" \
|
|
--replace "chardet>=3.0.2,<4" "chardet"
|
|
'';
|
|
|
|
# Tests require encrypted secrets, see
|
|
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"snowflake"
|
|
"snowflake.connector"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Snowflake Connector for Python";
|
|
homepage = "https://www.snowflake.com/";
|
|
license = licenses.asl20;
|
|
};
|
|
}
|