mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-19 22:02:06 +00:00
Make the pure build work
This commit is contained in:
parent
98392a7a3f
commit
05004a6cfd
@ -20,26 +20,23 @@ defaultCrateOverrides
|
|||||||
rav1e = attrs: { env.CARGO_ENCODED_RUSTFLAGS = "-C target-feature=-crt-static"; };
|
rav1e = attrs: { env.CARGO_ENCODED_RUSTFLAGS = "-C target-feature=-crt-static"; };
|
||||||
|
|
||||||
ffmpeg-sys-next = attrs: {
|
ffmpeg-sys-next = attrs: {
|
||||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
buildInputs = (attrs.buildInputs or []) ++ [
|
buildInputs = [
|
||||||
llvmPackages.libclang
|
rustPlatform.bindgenHook
|
||||||
ffmpeg.dev
|
ffmpeg
|
||||||
gcc.cc
|
|
||||||
gcc-unwrapped
|
|
||||||
stdenv
|
|
||||||
];
|
];
|
||||||
env = (attrs.env or {}) // {
|
};
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
|
||||||
CPATH = "${gcc-unwrapped}/lib/gcc/${stdenv.hostPlatform.config}/${gcc-unwrapped.version}/include";
|
ffmpeg-next = attrs: {
|
||||||
BINDGEN_EXTRA_CLANG_ARGS = builtins.concatStringsSep " " [
|
# Somehow the variables that are passed are mangled, so they are not
|
||||||
"-I${gcc.libc.dev}/include"
|
# correctly passed to the ffmpeg-next build script. Worth investigating
|
||||||
"-I${gcc}/lib/gcc/x86_64-unknown-linux-gnu/${gcc.version}/include"
|
# more since it's probably a bug in crate2nix or buildRustCrate.
|
||||||
"-I${llvmPackages.libclang.lib}/lib/clang/${llvmPackages.libclang.version}/include"
|
postPatch = ''
|
||||||
];
|
substituteInPlace build.rs \
|
||||||
PKG_CONFIG_PATH = "${ffmpeg.dev}/lib/pkgconfig";
|
--replace-fail "DEP_FFMPEG_" "DEP_FFMPEG_SYS_NEXT_"
|
||||||
};
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
grpc-metadata = attrs: {
|
grpc-metadata = attrs: {
|
||||||
|
Loading…
Reference in New Issue
Block a user