2023-11-16 04:20:00 +00:00
|
|
|
{ lib, beamPackages, makeWrapper, rebar3, elixir, erlang, fetchFromGitHub, nixosTests }:
|
2023-07-15 17:15:38 +00:00
|
|
|
beamPackages.mixRelease rec {
|
|
|
|
pname = "livebook";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.11.3";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
inherit elixir;
|
|
|
|
|
|
|
|
buildInputs = [ erlang ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "livebook-dev";
|
|
|
|
repo = "livebook";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-zUJM6OcXhHW8e09h2EKnfI9voF2k4AZ75ulQErNqjD0=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
mixFodDeps = beamPackages.fetchMixDeps {
|
|
|
|
pname = "mix-deps-${pname}";
|
|
|
|
inherit src version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-7GvtxEIEbC0QZEYIoARaX9uIsf/CoGE6dX60/mCvkYI=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
livebook-service = nixosTests.livebook-service;
|
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +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;
|
|
|
|
};
|
|
|
|
}
|