depot/pkgs/development/beam-modules/ex_doc/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

55 lines
1.3 KiB
Nix

{ lib, elixir, fetchFromGitHub, fetchMixDeps, mixRelease, nix-update-script }:
# Based on ../elixir-ls/default.nix
let
pname = "ex_doc";
version = "0.34.1";
src = fetchFromGitHub {
owner = "elixir-lang";
repo = "${pname}";
rev = "v${version}";
hash = "sha256-OXIRippEDYAKD222XzNJkkZdXbUkDUauv5amr4oAU7c=";
};
in
mixRelease {
inherit pname version src elixir;
stripDebug = true;
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;
hash = "sha256-fYINsATbw3M3r+IVoYS14aVEsg9OBuH6mNUqzQJuDQo=";
};
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 { };
}