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-01-02 11:29:13 +00:00
|
|
|
version = "1.1.37";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "executablebooks";
|
|
|
|
repo = "mystmd";
|
|
|
|
rev = "mystmd@${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-P4+0oCXQGziYfVUxIZe3j25lO6ho/4BdtqxCv/TTGko=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
npmDepsHash = "sha256-ZA9kiMTn+m9Q0C3DBVMiUEq5bfRsXM1VX0qrIH2GAQo=";
|
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";
|
|
|
|
};
|
|
|
|
}
|