Skip to content

Commit

Permalink
Merge pull request #246377 from dotlambda/reveal-md-buildNpmPackage
Browse files Browse the repository at this point in the history
reveal-md: use buildNpmPackage
  • Loading branch information
thiagokokada authored Aug 4, 2023
2 parents 3d3162f + d02af47 commit a6b0b74
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 324 deletions.
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ mapAliases {
gtop = pkgs.gtop; # added 2023-07-31
manta = pkgs.node-manta; # Added 2023-05-06
readability-cli = pkgs.readability-cli; # Added 2023-06-12
reveal-md = pkgs.reveal-md; # added 2023-07-31
thelounge = pkgs.thelounge; # Added 2023-05-22
triton = pkgs.triton; # Added 2023-05-06
typescript = pkgs.typescript; # Added 2023-06-21
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
, "redoc-cli"
, "remod-cli"
, "reveal.js"
, "reveal-md"
, "rimraf"
, "rollup"
, {"rust-analyzer-build-deps": "../../applications/editors/vscode/extensions/rust-lang.rust-analyzer/build-deps"}
Expand Down
309 changes: 0 additions & 309 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions pkgs/development/node-packages/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,6 @@ final: prev: {
'';
};

reveal-md = prev.reveal-md.override (
lib.optionalAttrs (!stdenv.isDarwin) {
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
prePatch = ''
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
'';
postInstall = ''
wrapProgram $out/bin/reveal-md \
--set PUPPETEER_EXECUTABLE_PATH ${pkgs.chromium.outPath}/bin/chromium
'';
}
);

rush = prev."@microsoft/rush".override {
name = "rush";
};
Expand Down
41 changes: 41 additions & 0 deletions pkgs/tools/text/reveal-md/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
pname = "reveal-md";
version = "5.5.1";

src = fetchFromGitHub {
owner = "webpro";
repo = "reveal-md";
rev = version;
hash = "sha256-BlUZsETMdOmnz+OFGQhQ9aLHxIIAZ12X1ipy3u59zxo=";
};

npmDepsHash = "sha256-xaDBB16egGi8zThHRrhcN8TVf6Nqkx8fkbxWqvJwJb4=";

env = {
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;
};

dontNpmBuild = true;

doCheck = true;

checkPhase = ''
runHook preCheck
npm run test
runHook postCheck
'';

meta = {
description = "Get beautiful reveal.js presentations from your Markdown files";
homepage = "https://github.com/webpro/reveal-md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ sagikazarmark ];
};
}
Loading

0 comments on commit a6b0b74

Please sign in to comment.