2023-10-24 16:53:12 +00:00
|
|
|
{ lib, beamPackages, makeWrapper, rebar3, elixir, erlang, fetchFromGitHub, nixosTests }:
|
2023-05-30 09:58:54 +00:00
|
|
|
beamPackages.mixRelease rec {
|
|
|
|
pname = "livebook";
|
2024-01-16 07:28:27 +00:00
|
|
|
version = "0.12.1";
|
2023-05-30 09:58:54 +00:00
|
|
|
|
|
|
|
inherit elixir;
|
|
|
|
|
|
|
|
buildInputs = [ erlang ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "livebook-dev";
|
|
|
|
repo = "livebook";
|
|
|
|
rev = "v${version}";
|
2024-01-16 07:28:27 +00:00
|
|
|
hash = "sha256-Q4c0AelZZDPxE/rtoHIRQi3INMLHeiZ72TWgy183f4Q=";
|
2023-05-30 09:58:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
mixFodDeps = beamPackages.fetchMixDeps {
|
|
|
|
pname = "mix-deps-${pname}";
|
|
|
|
inherit src version;
|
2024-01-16 07:28:27 +00:00
|
|
|
hash = "sha256-dyKhrbb7vazBV6LFERtGHLQXEx29vTgn074mY4fsHy4=";
|
2023-05-30 09:58:54 +00:00
|
|
|
};
|
|
|
|
|
2024-01-23 21:36:52 +00:00
|
|
|
postInstall = ''
|
2023-05-30 09:58:54 +00:00
|
|
|
wrapProgram $out/bin/livebook \
|
2024-01-23 21:36:52 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ elixir erlang ]} \
|
2023-05-30 09:58:54 +00:00
|
|
|
--set MIX_REBAR3 ${rebar3}/bin/rebar3
|
2024-01-23 21:36:52 +00:00
|
|
|
'';
|
2023-05-30 09:58:54 +00:00
|
|
|
|
2023-10-24 16:53:12 +00:00
|
|
|
passthru.tests = {
|
|
|
|
livebook-service = nixosTests.livebook-service;
|
|
|
|
};
|
|
|
|
|
2023-05-30 09:58:54 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|