marp-cli: init at 3.2.0

+78
+76
pkgs/tools/typesetting/marp/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchYarnDeps 5 + , makeWrapper 6 + , nodejs 7 + , prefetch-yarn-deps 8 + , yarn 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "marp-cli"; 13 + version = "3.2.0"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "marp-team"; 17 + repo = "marp-cli"; 18 + rev = "v${finalAttrs.version}"; 19 + hash = "sha256-bx5mq5KI85qUct/9Hr6mby6dWmRkmpVbiIw+M8PZas8="; 20 + }; 21 + 22 + offlineCache = fetchYarnDeps { 23 + yarnLock = "${finalAttrs.src}/yarn.lock"; 24 + hash = "sha256-BogCt7ezmWxv2YfhljHYoBf47/FHR0qLZosjnoQhqgs="; 25 + }; 26 + 27 + nativeBuildInputs = [ 28 + makeWrapper 29 + nodejs 30 + prefetch-yarn-deps 31 + yarn 32 + ]; 33 + 34 + configurePhase = '' 35 + runHook preConfigure 36 + 37 + export HOME=$(mktemp -d) 38 + yarn config --offline set yarn-offline-mirror $offlineCache 39 + fixup-yarn-lock yarn.lock 40 + yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install 41 + patchShebangs node_modules 42 + 43 + runHook postConfigure 44 + ''; 45 + 46 + buildPhase = '' 47 + runHook preBuild 48 + 49 + yarn --offline build 50 + 51 + runHook postBuild 52 + ''; 53 + 54 + installPhase = '' 55 + runHook preInstall 56 + 57 + yarn --offline --production install 58 + 59 + mkdir -p $out/lib/node_modules/@marp-team/marp-cli 60 + cp -r lib node_modules marp-cli.js $out/lib/node_modules/@marp-team/marp-cli/ 61 + 62 + makeWrapper "${nodejs}/bin/node" "$out/bin/marp" \ 63 + --add-flags "$out/lib/node_modules/@marp-team/marp-cli/marp-cli.js" 64 + 65 + runHook postInstall 66 + ''; 67 + 68 + meta = with lib; { 69 + description = "About A CLI interface for Marp and Marpit based converters"; 70 + homepage = "https://github.com/marp-team/marp-cli"; 71 + license = licenses.mit; 72 + maintainers = with maintainers; [ GuillaumeDesforges ]; 73 + platforms = nodejs.meta.platforms; 74 + mainProgram = "marp"; 75 + }; 76 + })
+2
pkgs/top-level/all-packages.nix
··· 5732 5732 5733 5733 marlin-calc = callPackage ../tools/misc/marlin-calc { }; 5734 5734 5735 + marp-cli = callPackage ../tools/typesetting/marp { }; 5736 + 5735 5737 masscan = callPackage ../tools/security/masscan { }; 5736 5738 5737 5739 massren = callPackage ../tools/misc/massren { };