File tree Expand file tree Collapse file tree
pkgs/development/python-modules/ai-edge-litert Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 buildPythonPackage ,
44 fetchurl ,
55 lib ,
6+ patchelf ,
67 python ,
78 pythonAtLeast ,
89 stdenv ,
@@ -71,6 +72,13 @@ buildPythonPackage {
7172 # TODO: npu-sdk
7273 } ;
7374
75+ preFixup = ''
76+ while IFS= read -r -d "" so; do
77+ ${ patchelf } /bin/patchelf --replace-needed libopenvino.so.2620 libopenvino.so "$so"
78+ ${ patchelf } /bin/patchelf --replace-needed libopenvino_tensorflow_lite_frontend.so.2620 libopenvino_tensorflow_lite_frontend.so "$so"
79+ done < <(find "$out" -type f \( -name '*.so' -o -name '*.so.*' \) -print0)
80+ '' ;
81+
7482 pythonRemoveDeps = lib . optionals ( pythonAtLeast "3.12" ) [
7583 # https://github.com/google-ai-edge/LiteRT/pull/5298
7684 "backports.strenum"
@@ -96,8 +104,5 @@ buildPythonPackage {
96104 # elftools.common.exceptions.ELFError: Magic number does not match
97105 lib . systems . inspect . patterns . isDarwin
98106 ] ;
99- # Incompatible with the openvino currently shipped in nixpkgs:
100- # auto-patchelf could not satisfy dependency libopenvino.so.2620
101- broken = true ;
102107 } ;
103108}
You can’t perform that action at this time.
0 commit comments