mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
Add remarkjs 0.6.4, a markdown-driven slideshow tool
Also, add required node packages (and update generated node pkgs).
This commit is contained in:
parent
31a94915d2
commit
6b634673f9
66
pkgs/development/web/remarkjs/default.nix
Normal file
66
pkgs/development/web/remarkjs/default.nix
Normal file
@ -0,0 +1,66 @@
|
||||
{ stdenv, lib, fetchgit, fetchurl, nodejs, nodePackages }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# highlight.js is a git submodule of remark
|
||||
highlightjs = fetchgit {
|
||||
url = https://github.com/isagalaev/highlight.js;
|
||||
rev = "10b9500b67983f0a9c42d8ce8bf8e8c469f7078c";
|
||||
sha256 = "1yy8by15kfklw8lwh17z1swpj067q0skjjih12yawbryraig41m0";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "remarkjs-${version}";
|
||||
|
||||
version = "0.6.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/gnab/remark/archive/v${version}.tar.gz";
|
||||
sha256 = "0sdhpn91b05qdqfqbfrhkfx8rkqrgm9pqg4bgjhxf9prfjhvmlrn";
|
||||
};
|
||||
|
||||
buildInputs = with nodePackages; [
|
||||
nodejs
|
||||
marked
|
||||
browserify
|
||||
uglify-js
|
||||
less
|
||||
mocha
|
||||
mocha-phantomjs
|
||||
phantomjs
|
||||
should
|
||||
sinon
|
||||
jshint
|
||||
shelljs
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir -p node_modules/.bin
|
||||
${concatStrings (map (dep: ''
|
||||
test -d ${dep}/bin && (for b in $(ls ${dep}/bin); do
|
||||
ln -sv -t node_modules/.bin ${dep}/bin/$b
|
||||
done)
|
||||
'') buildInputs)}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
substituteInPlace make.js --replace "target.test();" ""
|
||||
substituteInPlace make.js --replace vendor/highlight.js ${highlightjs}
|
||||
node make all
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -v out/* $out/lib/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://remarkjs.com;
|
||||
description = "A simple, in-browser, markdown-driven slideshow tool.";
|
||||
maintainers = [ stdenv.lib.maintainers.rickynils ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
};
|
||||
}
|
@ -1832,6 +1832,8 @@ let
|
||||
inherit (gnome) gnome_vfs GConf;
|
||||
};
|
||||
|
||||
remarkjs = callPackage ../development/web/remarkjs { };
|
||||
|
||||
remind = callPackage ../tools/misc/remind { };
|
||||
|
||||
remmina = callPackage ../applications/networking/remote/remmina {};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -122,4 +122,12 @@
|
||||
, "slasp"
|
||||
, "react"
|
||||
, { "pure-css": "git://github.com/yui/pure.git#v0.5.0-rc-1" }
|
||||
, "marked"
|
||||
, "browserify"
|
||||
, "uglify-js"
|
||||
, "less"
|
||||
, "mocha-phantomjs"
|
||||
, "phantomjs"
|
||||
, "sinon"
|
||||
, "shelljs"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user