So I’ve been reading the manual, but am still unsure how to add a library to a nix-shell. Do I just put it in buildImputs
or what? Specifically, haxe complains about missing stdlibc++.so.6
.
Thanks for your help.
So I’ve been reading the manual, but am still unsure how to add a library to a nix-shell. Do I just put it in buildImputs
or what? Specifically, haxe complains about missing stdlibc++.so.6
.
Thanks for your help.
if you’re running a program that’s packaged through nix, then this is an issue with a package on nixpkgs, and please create an issue.
Unless you’re running an executable locally, in which case this is just an issue with the environment.
To fix this issue with a shell.nix, add the following to your shell.nix
:
shellHook = ''
LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib
'';
Yes, both Haxe and VS Code are packaged through nix.
ah, then both of those are likely to be running other executables. I was playing with the idea of making vscode run in a buildFHSUserEnv to allow for extensions to work more naturally.
It doesn’t seem like many nix users also use Haxe. I searched and found one other topic in Learn.
Haxe itself does not have any dependency on the libc++.
As previous posts have shown, it is a tool/framework for game development that requires those and which is used in an impure and irreproducible manor, by installing the haxe compiler through nix and then using the haxelib
tool to install haxe library and tools on the side.
Those tools are not prepared for the nix environment and some of them even contain hardcoded pathes.
I agree though, that the haxe story in nix is below par. This is because from the nix side there wasn’t much of an effort to even try, because not many use haxe as it seems. On the other hand side, from earlier experience with the haxe community, I do not think they would change much to increase portability. Most of the time their responses were “just use the tools as they are intended to use and you won’t have any trouble”. Back then I had problems because a path to some C compiler was hardcoded in the libraries, but my distribution back then had it at a different location to enable versioning of the compilers.
@NobbZ it’s very frustrating. I have a laptop that won’t go online, so I can’t build a project there either. Naturally, the setup script has to download files.
Sorry, i so not see how this is relevant to the topic.
To be able to help you, we need to know more about how you set up your environment.
Please tell us how your shell.nix
looks like, what channel(s) do you use, how did you install what if it’s not in your shell.nix
?