2023-11-24 05:20:00 +01:00
|
|
|
{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
|
2023-10-22 06:20:00 +02:00
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "mystmd";
|
2023-11-24 05:20:00 +01:00
|
|
|
version = "1.1.31";
|
2023-10-22 06:20:00 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "executablebooks";
|
|
|
|
repo = "mystmd";
|
|
|
|
rev = "mystmd@${version}";
|
2023-11-24 05:20:00 +01:00
|
|
|
hash = "sha256-1zjz1HJxa8ww02MnqravCWM51bpuSpnLxn34Kazbt5o=";
|
2023-10-22 06:20:00 +02:00
|
|
|
};
|
|
|
|
|
2023-11-24 05:20:00 +01:00
|
|
|
npmDepsHash = "sha256-7H3VKJAzbsKLhyFD7MoASsOyJwbt6vERO6LM2mpz/y0=";
|
2023-10-22 06:20:00 +02:00
|
|
|
|
|
|
|
dontNpmInstall = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D packages/mystmd/dist/myst.cjs $out/bin/myst
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-11-24 05:20:00 +01:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = mystmd;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script { };
|
2023-10-28 06:20:00 +02:00
|
|
|
};
|
|
|
|
|
2023-10-22 06:20:00 +02: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";
|
|
|
|
};
|
|
|
|
}
|