at master 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 rerun, 6 python, 7 8 # nativeBuildInputs 9 rustPlatform, 10 11 # dependencies 12 attrs, 13 numpy, 14 opencv4, 15 pillow, 16 pyarrow, 17 semver, 18 typing-extensions, 19 20 # tests 21 datafusion, 22 pytestCheckHook, 23 torch, 24}: 25 26buildPythonPackage { 27 pname = "rerun-sdk"; 28 pyproject = true; 29 30 inherit (rerun) 31 src 32 version 33 cargoDeps 34 postPatch 35 ; 36 37 nativeBuildInputs = [ 38 rustPlatform.cargoSetupHook 39 rustPlatform.maturinBuildHook 40 rerun 41 ]; 42 43 dependencies = [ 44 attrs 45 numpy 46 opencv4 47 pillow 48 pyarrow 49 semver 50 typing-extensions 51 ]; 52 53 buildAndTestSubdir = "rerun_py"; 54 55 # https://github.com/NixOS/nixpkgs/issues/289340 56 # 57 # Alternatively, one could 58 # dontUsePythonImportsCheck = true; 59 # dontUsePytestCheck = true; 60 postInstall = '' 61 rm $out/${python.sitePackages}/rerun_sdk.pth 62 ln -s rerun_sdk/rerun $out/${python.sitePackages}/rerun 63 ''; 64 65 pythonImportsCheck = [ "rerun" ]; 66 67 nativeCheckInputs = [ 68 datafusion 69 pytestCheckHook 70 torch 71 ]; 72 73 inherit (rerun) addDlopenRunpaths addDlopenRunpathsPhase; 74 postPhases = lib.optionals stdenv.hostPlatform.isLinux [ "addDlopenRunpathsPhase" ]; 75 76 disabledTestPaths = [ 77 # "fixture 'benchmark' not found" 78 "tests/python/log_benchmark/test_log_benchmark.py" 79 80 # ConnectionError: Connection error: transport error 81 "rerun_py/tests/unit/test_datafusion_tables.py" 82 ]; 83 84 meta = { 85 description = "Python bindings for `rerun` (an interactive visualization tool for stream data)"; 86 inherit (rerun.meta) 87 changelog 88 homepage 89 license 90 maintainers 91 ; 92 mainProgram = "rerun"; 93 }; 94}