mmmrrr

mmmrrr

Nix with elixir-desktop

I’m trying to get GitHub - elixir-desktop/desktop: Building Local-First apps for Windows, MacOS, Linux, iOS and Android using Phoenix LiveView & Elixir! · GitHub running.

To get it running one needs erlang compiled against wxwidgets - which I think nix already does, since I can run :observer.start() in iex. But it seems that wxWebView is missing somehow.

I have the following shell.nix:

let
  pkgs = import <nixpkgs> {};
  unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in with pkgs;
  stdenv.mkDerivation {
  name = "elixir-project";
  buildInputs = [
  ];
  nativeBuildInputs = [
    unstable.erlang
    unstable.elixir
    unstable.wxGTK
    unstable.gtk3
    unstable.webkitgtk
    unstable.gcc
    unstable.sqlite
  ];
  shellHook = let
   in ''
   '';
}

Where nixos-unstable is: unstable https://nixos.org/channels/nixos-unstable

Any ideas what’s missing here?


Version: Erlang/OTP 24 [erts-12.1.3] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit] / 24.1.4

Error message becaus of course I forgot posting it:

** (Mix) Could not start application todo_app: exited in: TodoApp.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {{:EXIT, {{:badmatch, {:error, {{:undefined_function, {:wxWebView, :new, 0}}, [{:wxe_util, :rec, 1, [file: 'wxe_util.erl', line: 110]}, {Desktop.Fallback, :webview_new, 1, [file: 'lib/desktop/fallback.ex', line: 47]}, {Desktop.Window, :init, 1, [file: 'lib/desktop/window.ex', line: 189]}, {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 404]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}}, [{Desktop.Window, :start_link, 1, [file: 'lib/desktop/window.ex', line: 104]}, {:supervisor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 414]}, {:supervisor, :do_start_child, 2, [file: 'supervisor.erl', line: 400]}, {:supervisor, :handle_start_child, 2, [file: 'supervisor.erl', line: 706]}, {:supervisor, :handle_call, 3, [file: 'supervisor.erl', line: 455]}, {:gen_server, :try_handle_call, 4, [file: 'gen_server.erl', line: 721]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 750]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}]}}, {:child, :undefined, TodoWindow, {Desktop.Window, :start_link, [[app: :todo_app, id: TodoWindow, title: "TodoApp", size: {600, 500}, icon: "icon.png", menubar: TodoApp.MenuBar, icon_menu: TodoApp.Menu, url: &TodoWeb.Endpoint.url/0, app: :todo_app, id: TodoWindow]]}, :permanent, false, 5000, :worker, [Desktop.Window]}}}
            (todo_app 1.0.0) lib/todo_app.ex:35: TodoApp.start/2
            (kernel 8.1.2) application_master.erl:293: :application_master.start_it_old/4

Most Liked

mmmrrr

mmmrrr

Maybe and definitively not :smiley:

The cool thing about nix is that you can relatively easily overwrite package definitions and use your own. I’ll try to make it work and report back if I get it working.

At least I now have a starting point for what might be wrong - thanks ^.^

Where Next?

Popular in Discussions Top

laiboonh
Hi all, I am trying to convince my team to use liveview over the current react. What are some of the points where one should consider us...
New
WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&amp;*())^% %%:&gt;" From this string, I want to only keep the integers, ...
New
AstonJ
Are there any Elixir or Erlang libraries that help with this? I’ve been thinking how streaming services like twitch have exploded recentl...
New
Qqwy
Looking at the stacks that existing large companies have used, WhatsApp internally uses Mnesia to store the messages, while Discord uses ...
New
WolfDan
After doing a port from a c++ library to my project in phoenix I’ve seen that I need a faster way to run this algorithm and I found this ...
New
mmport80
I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort. It’s not as easy ...
New
sergio
There’s a new TIOBE index report that came out that shows Elixir is still not in the top 50 used languages. It also goes on to call Elix...
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
hariharasudhan94
Lets say i have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; "XX...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement