1 { stdenv, lib, fetchgit, fetchurl, nodejs, phantomjs2, pkgs }:
7 # highlight.js is a git submodule of remark
8 highlightjs = fetchgit {
9 url = "https://github.com/isagalaev/highlight.js";
10 rev = "10b9500b67983f0a9c42d8ce8bf8e8c469f7078c";
11 sha256 = "1yy8by15kfklw8lwh17z1swpj067q0skjjih12yawbryraig41m0";
14 nodePackages = import ./nodepkgs.nix {
16 inherit (stdenv.hostPlatform) system;
19 in stdenv.mkDerivation rec {
25 url = "https://github.com/gnab/remark/archive/v${version}.tar.gz";
26 sha256 = "1a2il6aa0g9cnig56ykmq8lr626pbxlsllk6js41h6gcn214rw60";
29 buildInputs = [ nodejs phantomjs2 ] ++ (with nodePackages; [
43 mkdir -p node_modules/.bin
44 ${concatStrings (map (dep: ''
45 test -d ${dep}/bin && (for b in $(ls ${dep}/bin); do
46 ln -sv -t node_modules/.bin ${dep}/bin/$b
52 substituteInPlace make.js --replace "target.test();" ""
53 substituteInPlace make.js --replace vendor/highlight.js ${highlightjs}
63 homepage = "https://remarkjs.com";
64 description = "A simple, in-browser, markdown-driven slideshow tool";
66 platforms = lib.platforms.linux;
67 license = lib.licenses.mit;