livebook: move under beam modules

This commit is contained in:
Adam C. Stephens
2025-08-20 16:25:38 -04:00
parent 49fdabf669
commit 03f1659390
3 changed files with 64 additions and 63 deletions
+1 -63
View File
@@ -1,63 +1 @@
{
lib,
beamMinimal28Packages,
makeWrapper,
fetchFromGitHub,
nixosTests,
nix-update-script,
}:
let
beamPackages = beamMinimal28Packages;
in
beamPackages.mixRelease rec {
pname = "livebook";
version = "0.16.4";
inherit (beamPackages) elixir;
buildInputs = [ beamPackages.erlang ];
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "livebook-dev";
repo = "livebook";
tag = "v${version}";
hash = "sha256-Cwzcoslqjaf7z9x2Sgnzrrl4zUcH2f7DEWaFPBIi3ms=";
};
mixFodDeps = beamPackages.fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
hash = "sha256-OEYkWh0hAl7ZXP2Cq+TgVGF4tnWlpF6W5uRSdyrswlA=";
};
postInstall = ''
wrapProgram $out/bin/livebook \
--prefix PATH : ${
lib.makeBinPath [
beamPackages.elixir
beamPackages.erlang
]
} \
--set MIX_REBAR3 ${beamPackages.rebar3}/bin/rebar3
'';
passthru = {
updateScript = nix-update-script { };
tests = {
livebook-service = nixosTests.livebook-service;
};
};
meta = {
license = lib.licenses.asl20;
homepage = "https://livebook.dev/";
description = "Automate code & data workflows with interactive Elixir notebooks";
maintainers = with lib.maintainers; [
munksgaard
scvalex
];
platforms = lib.platforms.unix;
};
}
{ beamMinimal28Packages }: beamMinimal28Packages.livebook
@@ -94,6 +94,8 @@ let
lfe = lfe_2_1;
lfe_2_1 = lib'.callLFE ../interpreters/lfe/2.1.nix { inherit erlang buildRebar3 buildHex; };
livebook = callPackage ./livebook { };
# Non hex packages. Examples how to build Rebar/Mix packages with and
# without helper functions buildRebar3 and buildMix.
hex = callPackage ./hex { };
@@ -0,0 +1,61 @@
{
lib,
beamPackages,
makeWrapper,
fetchFromGitHub,
nixosTests,
nix-update-script,
}:
beamPackages.mixRelease rec {
pname = "livebook";
version = "0.16.4";
inherit (beamPackages) elixir;
buildInputs = [ beamPackages.erlang ];
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "livebook-dev";
repo = "livebook";
tag = "v${version}";
hash = "sha256-Cwzcoslqjaf7z9x2Sgnzrrl4zUcH2f7DEWaFPBIi3ms=";
};
mixFodDeps = beamPackages.fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version;
hash = "sha256-OEYkWh0hAl7ZXP2Cq+TgVGF4tnWlpF6W5uRSdyrswlA=";
};
postInstall = ''
wrapProgram $out/bin/livebook \
--prefix PATH : ${
lib.makeBinPath [
beamPackages.elixir
beamPackages.erlang
]
} \
--set MIX_REBAR3 ${beamPackages.rebar3}/bin/rebar3
'';
passthru = {
updateScript = nix-update-script { };
tests = {
livebook-service = nixosTests.livebook-service;
};
};
meta = {
license = lib.licenses.asl20;
homepage = "https://livebook.dev/";
description = "Automate code & data workflows with interactive Elixir notebooks";
maintainers = with lib.maintainers; [
munksgaard
scvalex
];
platforms = lib.platforms.unix;
};
}