Skip to content

Commit

Permalink
python311Packages.connectorx: init at 0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Aug 10, 2024
1 parent 0e8141c commit 4d03c1a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pkgs/development/python-modules/connectorx/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{ lib, buildPythonPackage, rustPlatform, pytestCheckHook,

fetchFromGitHub,

krb5, openssl,

libkrb5, }:
buildPythonPackage rec {
pname = "connectorx";
version = "0.3.3";
pyproject = true;

src = fetchFromGitHub {
owner = "sfu-db";
repo = "connector-x";
rev = "v${version}";
hash = "sha256-L/tI2Lux+UnXZrpBxXX193pvb34hr5kqWo0Ncb1V+R0=";
};

sourceRoot = "${src.name}/connectorx-python";

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src sourceRoot;
name = "${pname}-python-${version}";
hash = "sha256-zeBYQXqCb/KXth+QG0n2yUZ1D6JNseEw+ru3xX04zts=";
};

env = {
# needed for openssl-sys
OPENSSL_NO_VENDOR = 1;
OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib";
OPENSSL_DIR = "${lib.getDev openssl}";
};

nativeBuildInputs = [
krb5 # needed for `krb5-config` during libgssapi-sys

rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustPlatform.bindgenHook
];

nativeCheckInputs = [ pytestCheckHook ];

buildInputs = [
libkrb5 # needed for libgssapi-sys
openssl # needed for openssl-sys
];

pythonImportsCheck = [ "connectorx" ];

meta = {
description =
"Fastest library to load data from DB to DataFrames in Rust and Python";
homepage = "https://sfu-db.github.io/connector-x";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ coastalwhite ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,8 @@ self: super: with self; {

connection-pool = callPackage ../development/python-modules/connection-pool { };

connectorx = callPackage ../development/python-modules/connectorx {};

connio = callPackage ../development/python-modules/connio { };

conway-polynomials = callPackage ../development/python-modules/conway-polynomials {};
Expand Down

0 comments on commit 4d03c1a

Please sign in to comment.