12 rootSource = fetchzip {
13 url = "https://github.com/pola-rs/${pname}/archive/refs/tags/py-polars-v${version}.tar.gz";
14 sha256 = "sha256-JOHjxTTPzS9Dd/ODp4r0ebU9hEonxrbjURJoq0BQCyI=";
18 inherit pname version;
20 disabled = pythonOlder "3.6";
26 cargoDeps = rustPlatform.fetchCargoTarball {
31 name = "${pname}-${version}";
32 sha256 = "sha256-KEt8lITY4El2afuh2cxnrDkXGN3MZgfKQU3Pe2jECF0=";
34 cargoRoot = "py-polars";
36 nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
38 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
40 pythonImportsCheck = [ "polars" ];
52 # Adding cmake to nativeBuildInputs and using `dontUseCmakeConfigure = true;`
53 # The following error still happens
55 # Compiling arrow2 v0.10.1 (https://github.com/ritchie46/arrow2?branch=polars#da703ae3)
56 # error[E0554]: `#![feature]` may not be used on the stable release channel
57 # --> /build/polars-0.13.19-vendor.tar.gz/arrow2/src/lib.rs:8:39
59 # 8 | #![cfg_attr(feature = "simd", feature(portable_simd))]
61 # error: aborting due to previous error
62 # For more information about this error, try `rustc --explain E0554`.
63 # error: could not compile `arrow2` due to 2 previous errors
64 # warning: build failed, waiting for other jobs to finish...
66 # Caused by: Failed to build a native library through cargo
67 # Caused by: Cargo build finished with "exit status: 101": `cargo rustc --message-format json --manifest-path Cargo.toml -j 8 --frozen --target x86_64-unknown-linux-gnu --release --lib -- -C link-arg=-s`
68 # error: builder for '/nix/store/qfnqi5hs3x4xdb6d4f6rpaf63n1w74yn-python3.10-polars-0.13.19.drv' failed with exit code 1;
70 # > error: aborting due to previous error
73 # > For more information about this error, try `rustc --explain E0554`.
75 # > error: could not compile `arrow2` due to 2 previous errors
76 # > warning: build failed, waiting for other jobs to finish...
78 # > Caused by: Failed to build a native library through cargo
79 # > Caused by: Cargo build finished with "exit status: 101": `cargo rustc --message-format json --manifest-path Cargo.toml -j 8 --frozen --target x86_64-unknown-linux-gnu --release --lib -- -C link-arg=-s`
80 # For full logs, run 'nix log /nix/store/qfnqi5hs3x4xdb6d4f6rpaf63n1w74yn-python3.10-polars-0.13.19.drv'.
82 description = "Fast multi-threaded DataFrame library in Rust | Python | Node.js ";
83 homepage = "https://github.com/pola-rs/polars";
84 license = licenses.asl20;
85 maintainers = with maintainers; [ happysalada ];