depot/third_party/nixpkgs/pkgs/by-name/my/mystmd/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

42 lines
1 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
buildNpmPackage rec {
pname = "mystmd";
version = "1.2.5";
src = fetchFromGitHub {
owner = "executablebooks";
repo = "mystmd";
rev = "mystmd@${version}";
hash = "sha256-K+19Ez+uSxa2pf59msdYl33HHIj55znsBMSEvF9JeoI=";
};
npmDepsHash = "sha256-5Ma2+DrX3z/sdvBwnXtRAfLTOmoPtiEeMyYfAUf2/9o=";
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 { };
};
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 = [ ];
mainProgram = "myst";
};
}