nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 58 lines 1.4 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, pythonOlder 5, rustPlatform 6, libiconv 7, fetchzip 8}: 9let 10 pname = "polars"; 11 version = "0.13.19"; 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="; 15 }; 16in 17buildPythonPackage { 18 inherit pname version; 19 format = "pyproject"; 20 disabled = pythonOlder "3.6"; 21 src = rootSource; 22 preBuild = '' 23 cd py-polars 24 ''; 25 26 cargoDeps = rustPlatform.fetchCargoTarball { 27 src = rootSource; 28 preBuild = '' 29 cd py-polars 30 ''; 31 name = "${pname}-${version}"; 32 sha256 = "sha256-KEt8lITY4El2afuh2cxnrDkXGN3MZgfKQU3Pe2jECF0="; 33 }; 34 cargoRoot = "py-polars"; 35 36 nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ]; 37 38 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 39 40 pythonImportsCheck = [ "polars" ]; 41 # checkInputs = [ 42 # pytestCheckHook 43 # fixtures 44 # graphviz 45 # matplotlib 46 # networkx 47 # numpy 48 # pydot 49 # ]; 50 51 meta = with lib; { 52 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; 53 description = "Fast multi-threaded DataFrame library in Rust | Python | Node.js "; 54 homepage = "https://github.com/pola-rs/polars"; 55 license = licenses.asl20; 56 maintainers = with maintainers; [ happysalada ]; 57 }; 58}