helix: support cross compilation

This commit is contained in:
Colin 2023-08-11 23:01:46 +00:00
parent 4e7ffe3140
commit 5bbb3678ed
1 changed files with 5 additions and 2 deletions

View File

@ -11,12 +11,15 @@ let
};
in
helix.overrideAttrs (upstream: {
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
rsync
];
configurePhase = (upstream.configurePhase or "") + ''
cat ${languages} >> languages.toml
substituteAllInPlace languages.toml
${rsync}/bin/rsync -arv ${tree-sitter-nix-shell.generated}/ runtime/grammars/sources/nix-shell/
${rsync}/bin/rsync -arv ${tree-sitter-nix-shell}/queries/ runtime/queries/nix-shell/
rsync -arv ${tree-sitter-nix-shell.generated}/ runtime/grammars/sources/nix-shell/
rsync -arv ${tree-sitter-nix-shell}/queries/ runtime/queries/nix-shell/
# helix tries to delete the sources during installPhase
chmod -R +w runtime/grammars/sources/nix-shell