···
13
+
stdenv.mkDerivation (finalAttrs: {
17
+
src = fetchFromGitHub {
18
+
owner = "jannis-baum";
20
+
tag = "v${finalAttrs.version}";
21
+
hash = "sha256-2lxf21T9y4GMFlk0+qbaJJ/twRffYEBoBXZXe/NRDQk=";
24
+
yarnOfflineCache = fetchYarnDeps {
25
+
yarnLock = "${finalAttrs.src}/yarn.lock";
26
+
hash = "sha256-mOgfwetiLMTDquw3f3+U1iEhBbvf0OC5lkNJHdrRSK0=";
34
+
substituteInPlace node_modules/.bin/tsc \
35
+
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
37
+
substituteInPlace node_modules/.bin/webpack \
38
+
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
40
+
substituteInPlace node_modules/.bin/postject \
41
+
--replace-fail '/usr/bin/env node' '${lib.getExe nodejs}'
46
+
install -Dm755 ./build/linux/viv $out/bin/viv
47
+
install -Dm755 ./build/linux/vivify-server $out/bin/vivify-server
49
+
wrapProgram $out/bin/viv \
58
+
nativeBuildInputs = [
60
+
npmHooks.npmInstallHook
67
+
# Stripping 'unneeded symbols' causes vivify-server executable to break
68
+
# (segmentation fault)
72
+
description = "Live Markdown viewer";
73
+
longDescription = ''
74
+
Vivify brings your files to life in the browser!
75
+
Vivify is primarily made to render Markdown and Jupyter Notebooks, but will also
76
+
serve as a directory browser and let you view code files with syntax highlighting.
78
+
homepage = "https://github.com/jannis-baum/Vivify";
79
+
changelog = "https://github.com/jannis-baum/Vivify/releases/tag/v${finalAttrs.src.tag}";
80
+
license = lib.licenses.gpl3;
81
+
maintainers = with lib.maintainers; [ skohtv ];
82
+
platforms = lib.platforms.linux;
83
+
mainProgram = "viv";