python3Packages.pytorch-tokenizers: fix build by patching sentencepiece src

This commit is contained in:
Gaetan Lepage
2026-01-05 09:23:07 +00:00
parent 9af67fcf07
commit 164d250932
2 changed files with 15 additions and 0 deletions
@@ -0,0 +1,13 @@
Submodule third-party/sentencepiece contains modified content
diff --git a/third-party/sentencepiece/src/sentencepiece_processor.h b/third-party/sentencepiece/src/sentencepiece_processor.h
index dd3f092..553fbff 100644
--- a/third-party/sentencepiece/src/sentencepiece_processor.h
+++ b/third-party/sentencepiece/src/sentencepiece_processor.h
@@ -16,6 +16,7 @@
#define SENTENCEPIECE_PROCESSOR_H_
#include <cstring>
+#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
@@ -45,6 +45,8 @@ buildPythonPackage rec {
(replaceVars ./dont-fetch-pybind11.patch {
pybind11 = pybind11-src;
})
# error: uint32_t does not name a type
./add-missing-cstdint-sentencepiece.patch
];
postPatch = ''