depot/third_party/nixpkgs/pkgs/by-name/my/mystmd/package.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

42 lines
1 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
buildNpmPackage rec {
pname = "mystmd";
version = "1.2.9";
src = fetchFromGitHub {
owner = "executablebooks";
repo = "mystmd";
rev = "mystmd@${version}";
hash = "sha256-dble78oGZ7xJhopLQVgXHvKRJBShnshp2jHxNzmzLDE=";
};
npmDepsHash = "sha256-Hr4Zs2c2+7bOFfVPWkpc1Aw8DLz+ue9A1WW9nXlpBPo=";
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";
};
}