mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
tree-sitter: fix riscv64-linux build
This commit is contained in:
@@ -193,6 +193,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
substituteInPlace ./Makefile \
|
||||
--replace-fail 'all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc' 'all: libtree-sitter.a tree-sitter.pc'
|
||||
sed -i '/^install:/,/^[^[:space:]]/ { /$(SOEXT/d; }' ./Makefile
|
||||
''
|
||||
# rquickjs-sys passes the raw rust target to clang, which does not know riscv64gc
|
||||
+ lib.optionalString stdenv.hostPlatform.isRiscV64 ''
|
||||
substituteInPlace $cargoDepsCopy/source-*/rquickjs-sys-*/build.rs \
|
||||
--replace-fail \
|
||||
'let mut cflags = vec![format!("--target={}", target)];' \
|
||||
'let mut cflags = vec![format!("--target={}", target.replace("riscv64gc", "riscv64"))];'
|
||||
'';
|
||||
|
||||
# The Makefile install can't enable the wasm feature.
|
||||
|
||||
Reference in New Issue
Block a user