Livebook install on Nixos using Devenv

I am trying to install Livebook on Nixos using the escript method, and am getting the following error:

livebook server
/usr/bin/env: ‘escript’: No such file or directory. I apologize in advance, I am a new Elixir user

I followed the instructions an added the escripts directory to my path in Fish shell, but it is still unable to find the path. I have a feeling it is due to my development shell Devenv (www.devenv.sh). However, before I go down that rabbit hole I wanted to check here first and see if this might not be an easy fix.

Thank you!

1 Like

Escript binary is a part of the erlang package. It should be enough to just add erlang to your devenv, alongside elixir.

I have created Nix Flake for Livebook if you are interested. This Flake takes care of all dependencies that you would need

I plan on expanding it with more OTP-related projects to be more like Fenix but for OTP related stuff.

2 Likes

This one works thanks @hauleth I used your work as the basis for a flox version too GitHub - flox-examples/livebook

1 Like

That did the trick, thank you so much! Also, I don’t know if this matters, but the creator of Devenv updated the documentation to include this based on my question. It might be helpful in some other context if you use the tool:

{ … }:

{
languages.elixir.enable = true;

enterShell = ‘’
export PATH=“$HOME/.mix/escripts:$PATH”
‘’;
}

1 Like

Starred this repository. It is my goal to move my NixOS config to a flake very soon based on this video: Moving Nixos System Configuration Into A Flake - YouTube

Thanks for the info!

2 Likes

Hi Sam,

I have been watching your work closely on flox. Keep up the good work!

1 Like

I posted the wrong link earlier, this is where we had used your example to create a “flox” based example. thanks again for these clues GitHub - flox-examples/flox-livebook