Every time I install Erlang, I end up without Observer support. Probably missing something basic, but can’t figure out what.
Used the commands below on a Ubuntu laptop with Xmonad and a Debian 9 running in the cloud, and seemingly they both resulted in the same package being installed:
- nix-env -iA pkgs.beam.packages.erlangR22
- nix-env -iA nixpkgs.beam.interpreters.erlang
- nix-env -iA nixpkgs.beam.interpreters.erlangR22_odbc_javac
The Nixpkgs manuals 15.2. BEAM Languages (Erlang, Elixir & LFE) section (Version 19.09.1484.84586a4514d) does not mention Observer at all. It has a fairly recent update by @DianaOlympos that does mention it, albeit I tried all these packages, but no joy:
Many Erlang/OTP distributions available in
beam.interpreters have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there’s
beam.interpreters.erlangR22_odbc_javac, which corresponds to
beam.interpreters.erlangR22_nox, which corresponds to
Update: Also cross-posted this on Stackoverflow.
On OSX I also need
wxmac, and I believe for Linux you want one of the wxGTK packages:
These appear to already be expressed in the nixpkgs definitions:
However, they’re not defined as
propagatedBuildInputs in the first link, so you have to also name the wx package separately when installing in order to have it available at runtime.
I don’t have ready access to a Nix-enabled desktop Linux host right now to test for myself, but I think that should let you move forward. Good luck!
Of course, I remember now having this issue once even before getting into Nix, and I was missing
wx libraries… Thank you!
I may follow up with some questions regarding this, as I have to get more familiar with Nix scripting. Thanks again for looking into this issue!
I’m a bit confused though as to what the point is having a specific
erlang_nox attribute when it points to the same package with
wxwidget support as the
Although, I guess this is because the actual
wx libraries are platform dependent, that is why there’s
wxmaxima, and so on. Also found a thread here on the state of BEAM ecosystem that kind of explains this situation.
Anyway, it’s just hard to believe there is no guide on how to set up Erlang with Observer when it is a tool very often used during development.
Or maybe I should learn to properly google. Sorry for venting.
I’m using Elixir, and Observer work out of the box on my machine
Hello @toraritte , happy to have you using BEAM on Nix !
The BEAM ecosystem is a bit in flux right now while i am trying to clean it up a bit. Sorry if things do not work as expected and i can’t thank you enough for your feedback.
I have not dived yet into the side of things with observer that much, my focus is somewhere else but i can at least explain one thing.
This is to enable people that use nix with erlang on their server to not dl the whole display stack. On production, we use erlang through nixpkgs but we don’t really want the whole X stack to be installed on the server. Hence why the
_nox things, for erlang without observer support.
This is even simpler to explain. There are no guide to set up anything with Nix really. This is something i would love to help too and i have ideas, but it is down the list of stuff to do. It is even more true for BEAM on Nix which has not always been the most well handled in nixpkgs. I would love the nixpkgs documentation to be far more useful and “Result oriented” for the BEAM ecosystem. It is just not on the top compared to other far more problematic things on my list. Plus, the fact the community keep wanting something other than markdown make it a pita. But that is not my choice to make.
@shanesveller do you think we should propagate them ? if yes i would love first an issue on that. And if you have the time then a PR. Otherwise, i will add it to my laundry list of todos for the BEAM ecosystem. It will sadly not be at the top
I believe @shanesveller’s pointer regarding
propagatedBuildInputs is right (and thanks again for the research!), and just realized that there is a Nix pill on this topic. I’ll try to figure this out, and once I have a solution, I would be happy to contribute to the docs.
Do you track these issues in a public place somewhere? Not very skilled with Nix, but would love to follow along. Or the state of the BEAM ecosystem thread is specifically for that?
So there is no place really tracking it. I use mostly my state of the BEAM as a place to discuss them. And once some action are decided or seems to get a good support, then i would or create and issue to discuss it or just do a PR.
Kind of ashamed to admit that I am an idiot, but Observer was there all this time (along with
For some reason, it wouldn’t autocomplete on the
erl shell, but once
observer:start(). was typed in and executed, it would recognize the module, and provide a list of available functions when hitting the Tab key.
I probably messed up translating between
observer.start(). and other combinations), and I assumed that the resulting error message (together with no autocompletion) means that the module was missing.