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

AlexMcConnell
The reason that Rails is as popular as it is is because it’s very easy for relatively inexperienced developers to get a lot of work done....
588 20070 166
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New

We're in Beta

About us Mission Statement