Skip to content

Commit 00d6425

Browse files
authored
python3Packages.ai-edge-litert: unbreak (#538661)
2 parents 572c552 + 7198eee commit 00d6425

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

  • pkgs/development/python-modules/ai-edge-litert

pkgs/development/python-modules/ai-edge-litert/default.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
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
}

0 commit comments

Comments
 (0)