50 lines
1.1 KiB
Nix
Raw Permalink Normal View History

{
lib,
buildNpmPackage,
fetchFromGitHub,
mystmd,
testers,
nix-update-script,
}:
2023-10-22 04:20:00 +00:00
buildNpmPackage rec {
pname = "mystmd";
2024-12-08 23:57:06 +00:00
version = "1.3.18";
2023-10-22 04:20:00 +00:00
src = fetchFromGitHub {
owner = "executablebooks";
repo = "mystmd";
rev = "mystmd@${version}";
2024-12-08 23:57:06 +00:00
hash = "sha256-20Cxs4ib7xRn4UC9ShiQ+KnyrTCmW/vII7QN9BObY78=";
2023-10-22 04:20:00 +00:00
};
2024-12-08 23:57:06 +00:00
npmDepsHash = "sha256-dcjOxEYTG/EnBRu+RE7cpSEvNmG32QsDDYzItaNTpa0=";
2023-10-22 04:20:00 +00:00
dontNpmInstall = true;
installPhase = ''
runHook preInstall
install -D packages/mystmd/dist/myst.cjs $out/bin/myst
runHook postInstall
'';
passthru = {
tests.version = testers.testVersion {
package = mystmd;
version = "v${version}";
};
updateScript = nix-update-script { };
2023-10-28 04:20:00 +00:00
};
2023-10-22 04:20:00 +00:00
meta = with lib; {
description = "Command line tools for working with MyST Markdown";
homepage = "https://github.com/executablebooks/mystmd";
changelog = "https://github.com/executablebooks/mystmd/blob/${src.rev}/packages/myst-cli/CHANGELOG.md";
license = licenses.mit;
2024-04-24 04:20:00 +00:00
maintainers = [ ];
2023-10-22 04:20:00 +00:00
mainProgram = "myst";
};
}