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!

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

https://github.com/hauleth/nix-elixir

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

This one works thanks @hauleth I used your work as the basis for a flox version too https://github.com/flox-examples/livebook

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”
‘’;
}

Starred this repository. It is my goal to move my NixOS config to a flake very soon based on this video: https://www.youtube.com/watch?v=mJbQ--iBc1U

Thanks for the info!

Hi Sam,

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

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 https://github.com/flox-examples/flox-livebook