2024-01-02 11:29:13 +00:00
|
|
|
{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "mystmd";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1.44";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "executablebooks";
|
|
|
|
repo = "mystmd";
|
|
|
|
rev = "mystmd@${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-cNpnXEcG7XGQO17HtgRYA0nn1LV8BWEbbzoeeHfh50Q=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
npmDepsHash = "sha256-oflaxF4npCqS3k90G3kJkBkPy1xGL/orG5d4VMqMjlo=";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
dontNpmInstall = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D packages/mystmd/dist/myst.cjs $out/bin/myst
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = mystmd;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script { };
|
2023-11-16 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;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
mainProgram = "myst";
|
|
|
|
};
|
|
|
|
}
|