ex_doc: init at 0.31.2

This commit is contained in:
Barry Moore 2024-04-02 13:29:40 -04:00
parent a62fab270e
commit 41e52bde8b
3 changed files with 58 additions and 1 deletions

View File

@ -83,6 +83,8 @@ let
# Remove old versions of elixir, when the supports fades out:
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
ex_doc = callPackage ./ex_doc { inherit elixir fetchMixDeps mixRelease; };
elixir-ls = callPackage ./elixir-ls { inherit elixir fetchMixDeps mixRelease; };
lfe = lfe_2_1;

View File

@ -0,0 +1,55 @@
{ lib, elixir, fetchFromGitHub, fetchMixDeps, mixRelease, nix-update-script }:
# Based on ../elixir-ls/default.nix
let
pname = "ex_doc";
version = "0.31.2";
src = fetchFromGitHub {
owner = "elixir-lang";
repo = "${pname}";
rev = "v${version}";
hash = "sha256-qUiXZ1KHD9sS1xG7QNYyrZVzPqerwCRdkN8URrlQ45g=";
};
in
mixRelease {
inherit pname version src elixir;
stripDebug = true;
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;
hash = "sha256-ZNHhWCZ3n2Y/XCsXVjbu4wbx/J95JdFP/2raACciAUU=";
};
configurePhase = ''
runHook preConfigure
mix deps.compile --no-deps-check
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
mix do escript.build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -v ex_doc $out/bin
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/elixir-lang/ex_doc";
description = ''
ExDoc produces HTML and EPUB documentation for Elixir projects
'';
license = licenses.asl20;
platforms = platforms.unix;
mainProgram = "ex_doc";
maintainers = with maintainers; [chiroptical];
};
passthru.updateScript = nix-update-script { };
}

View File

@ -17397,7 +17397,7 @@ with pkgs;
erlang_nox = beam_nox.interpreters.erlang;
inherit (beam.packages.erlang)
erlang-ls erlfmt elvis-erlang
ex_doc erlang-ls erlfmt elvis-erlang
rebar rebar3 rebar3WithPlugins
fetchHex
lfe lfe_2_1;