17 rootSource = fetchFromGitHub {
20 rev = "refs/tags/py-${version}";
21 hash = "sha256-6tn3Q6oZfMjgQ5l5xCFnGimLSDLOjTWCW5uEbi6yFZY=";
23 rust-jemalloc-sys' = rust-jemalloc-sys.override {
24 jemalloc = jemalloc.override {
25 disableInitExecTls = true;
30 inherit pname version;
32 disabled = pythonOlder "3.6";
36 # workaround for apparent rustc bug
37 # remove when we're at Rust 1.73
38 # https://github.com/pola-rs/polars/issues/12050
39 ./all_horizontal.patch
42 # Cargo.lock file is sometimes behind actual release which throws an error,
43 # thus the `sed` command
44 # Make sure to check that the right substitutions are made when updating the package
47 #sed -i 's/version = "0.18.0"/version = "${version}"/g' Cargo.lock
50 cargoDeps = rustPlatform.importCargoLock {
51 lockFile = ./Cargo.lock;
53 "jsonpath_lib-0.3.0" = "sha256-NKszYpDGG8VxfZSMbsTlzcMGFHBOUeFojNw4P2wM3qk=";
56 cargoRoot = "py-polars";
58 # Revisit this whenever package or Rust is upgraded
61 propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ typing-extensions ];
63 dontUseCmakeConfigure = true;
66 # needed for libz-ng-sys
67 # TODO: use pkgs.zlib-ng
69 ] ++ (with rustPlatform; [
76 ] ++ lib.optionals stdenv.isDarwin [
78 darwin.apple_sdk.frameworks.Security
81 pythonImportsCheck = [ "polars" ];
82 # nativeCheckInputs = [
93 description = "Fast multi-threaded DataFrame library in Rust | Python | Node.js ";
94 homepage = "https://github.com/pola-rs/polars";
95 license = licenses.asl20;
96 maintainers = with maintainers; [ happysalada ];