livebook: init at 0.9.2

This commit adds a package for the [livebook](https://livebook.dev) interactive
Elixir notebook environment.

Created with inspiration from
https://github.com/hauleth/nix-elixir/blob/master/pkgs/livebook.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Philip Munksgaard 2023-05-30 11:58:54 +02:00 committed by Yt
parent 880de018d9
commit 1fca3245e7
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{ lib, beamPackages, makeWrapper, rebar3, elixir, erlang, fetchFromGitHub }:
beamPackages.mixRelease rec {
pname = "livebook";
version = "0.9.2";
inherit elixir;
buildInputs = [ erlang ];
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "livebook-dev";
repo = "livebook";
rev = "v${version}";
hash = "sha256-khC3gtRvywgAY6qHslZgAV3kmziJgKhdCB8CDg/HkIU=";
};
mixFodDeps = beamPackages.fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
sha256 = "rwWGs4fGeuyV6BBFgCyyDwKf/YLgs1wY0xnHYy8iioE=";
};
installPhase = ''
mix escript.build
mkdir -p $out/bin
mv ./livebook $out/bin
wrapProgram $out/bin/livebook \
--prefix PATH : ${lib.makeBinPath [ elixir ]} \
--set MIX_REBAR3 ${rebar3}/bin/rebar3
'';
meta = with lib; {
license = licenses.asl20;
homepage = "https://livebook.dev/";
description = "Automate code & data workflows with interactive Elixir notebooks";
maintainers = with maintainers; [ munksgaard ];
platforms = platforms.unix;
};
}

View File

@ -3620,6 +3620,8 @@ with pkgs;
lesspass-cli = callPackage ../tools/security/lesspass-cli { };
livebook = callPackage ../servers/web-apps/livebook { };
lsix = callPackage ../tools/graphics/lsix { };
mdr = callPackage ../tools/misc/mdr { };