Skip to content

Commit

Permalink
reveal-md: use buildNpmPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda committed Aug 2, 2023
1 parent cf6c391 commit d02af47
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 @@ -49,6 +49,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 @@ -272,7 +272,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 @@ -420,19 +420,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 d02af47

Please sign in to comment.