Open sledgehammervampire opened 3 years ago
Is it marked as executable? E.g. chmod +x ...
?
You also need to fix the interpreter path.
I created a derivation that builds flowistry_ide from source here: https://github.com/beeb/.dotfiles/blob/main/pkgs/flowistry/default.nix
The binary seems to work fine and I can run cargo flowistry
which shows no output (but no errors).
cargo-flowistry
and flowistry-driver
are available on the path.
However, the extension still seems to want to have rustup
to work, but I do not have rustup on my system. What do I need to do to use the extension if I don't want rustup? I manage my rust toolchain with nix and can't use rustup at the same time.
I'm on Ubuntu btw, not nixOS, but I suspect the problem is not relevant to the OS.
The issue is that Flowistry needs to download a specific nightly toolchain of the Rust compiler for it to work. Flowistry would need some kind of abstraction over toolchain managers that would support Rustup, Nix, and the like. I don't have the time to implement that, but I would accept such a contribution.
@willcrichton thanks for the reply. You mean that the nightly toolchain is required at runtime, correct? So it's unable to run even if it was compiled with all required dependencies?
That's right, the nightly toolchain is required at runtime because compiler plugins are dynamically linked against the compiler.
I installed flowistry via the vscode extension. After patching the rpath of the cargo-flowistry and flowistry-driver binaries, I still get this error when running a flowistry command in vscode:
Invoking
cargo flowistry
gives:Invoking the cargo-flowistry binary directly gives:
Both
cargo-flowistry
andflowistry-driver
exist:The usual suspect for these errors on NixOS is a missing dynamic library. But I have patched the binaries so that the libraries are found: