depot/third_party/nixpkgs/pkgs/by-name/my/mystmd/package.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

42 lines
1.1 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub, mystmd, testers, nix-update-script }:
buildNpmPackage rec {
pname = "mystmd";
version = "1.1.44";
src = fetchFromGitHub {
owner = "executablebooks";
repo = "mystmd";
rev = "mystmd@${version}";
hash = "sha256-cNpnXEcG7XGQO17HtgRYA0nn1LV8BWEbbzoeeHfh50Q=";
};
npmDepsHash = "sha256-oflaxF4npCqS3k90G3kJkBkPy1xGL/orG5d4VMqMjlo=";
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 = [ maintainers.marsam ];
mainProgram = "myst";
};
}