nixpkgs/pkgs/development/web/remarkjs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.6 KiB
Nix
Raw Normal View History

2022-04-23 01:59:11 +02:00
{ stdenv, lib, fetchFromGitHub, nodejs, pkgs }:
with lib;
let
# highlight.js is a git submodule of remark
2021-10-24 22:37:56 +02:00
highlightjs = fetchFromGitHub {
owner = "isagalaev";
repo = "highlight.js";
rev = "10b9500b67983f0a9c42d8ce8bf8e8c469f7078c";
sha256 = "1yy8by15kfklw8lwh17z1swpj067q0skjjih12yawbryraig41m0";
};
nodePackages = import ./nodepkgs.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
};
2021-10-24 22:37:56 +02:00
in
stdenv.mkDerivation rec {
pname = "remarkjs";
2014-10-28 14:44:17 +01:00
version = "0.7.0";
2021-10-24 22:37:56 +02:00
src = fetchFromGitHub {
owner = "gnab";
repo = "remark";
rev = "v${version}";
sha256 = "sha256-zhHuW4pBqXQEBlSxuyvHKh+ftyIdcqpYgIZZHArUtns=";
};
2022-04-23 01:59:11 +02:00
buildInputs = [ nodejs ] ++ (with nodePackages; [
marked
browserify
uglify-js
less
mocha
#mocha-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 = "https://remarkjs.com";
2014-11-11 14:20:43 +01:00
description = "A simple, in-browser, markdown-driven slideshow tool";
2021-10-24 22:37:56 +02:00
maintainers = [ ];
2021-01-23 18:15:07 +01:00
platforms = lib.platforms.linux;
license = lib.licenses.mit;
2016-06-11 02:28:50 +02:00
broken = true;
};
}