depot/third_party/nixpkgs/pkgs/by-name/my/mystmd/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

42 lines
1 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
buildNpmPackage rec {
pname = "mystmd";
version = "1.2.0";
src = fetchFromGitHub {
owner = "executablebooks";
repo = "mystmd";
rev = "mystmd@${version}";
hash = "sha256-SxUZvPSitzWZzTa490dkJWw6fZ5PtN8hy7fglifPn6o=";
};
npmDepsHash = "sha256-fwjtEw2mAnNX7lo9ovCC58qqtJPDLc2Ho9I1Ui0k/iI=";
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";
};
}