1{ lib, python3Packages, fetchFromGitHub }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "codebraid";
5 version = "0.5.0-unstable-2020-08-14";
6
7 src = fetchFromGitHub {
8 owner = "gpoore";
9 repo = pname;
10 rev = "526a223c4fc32c37d6c5c9133524dfa0e1811ca4";
11 sha256 = "0qkqaj49k584qzgx9jlsf5vlv4lq7x403s1kig8v87i0kgh55p56";
12 };
13
14 propagatedBuildInputs = with python3Packages; [ bespon ];
15 # unfortunately upstream doesn't contain tests
16 checkPhase = ''
17 $out/bin/codebraid --help > /dev/null
18 '';
19 meta = with lib; {
20 homepage = "https://github.com/gpoore/codebraid";
21 description = ''
22 Live code in Pandoc Markdown.
23
24 Codebraid is a Python program that enables executable code in Pandoc
25 Markdown documents. Using Codebraid can be as simple as adding a class to
26 your code blocks' attributes, and then running codebraid rather than
27 pandoc to convert your document from Markdown to another format.
28 codebraid supports almost all of pandoc's options and passes them to
29 pandoc internally.
30
31 Codebraid provides two options for executing code. It includes a built-in
32 code execution system that currently supports Python 3.5+, Julia, Rust,
33 R, Bash, and JavaScript. Code can also be executed using Jupyter kernels,
34 with support for rich output like plots.
35 '';
36 license = licenses.bsd3;
37 maintainers = with maintainers; [ synthetica ];
38 };
39}