2021-02-05 17:12:51 +00:00
|
|
|
{ lib, python3Packages, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "codebraid";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.11.0";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gpoore";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-E9vzGK9ZEVwF+UBpSkdM+hm6vINen/A+LgnnPpc77QQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [ bespon ];
|
|
|
|
# unfortunately upstream doesn't contain tests
|
|
|
|
checkPhase = ''
|
|
|
|
$out/bin/codebraid --help > /dev/null
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/gpoore/codebraid";
|
|
|
|
description = ''
|
|
|
|
Live code in Pandoc Markdown.
|
|
|
|
|
|
|
|
Codebraid is a Python program that enables executable code in Pandoc
|
|
|
|
Markdown documents. Using Codebraid can be as simple as adding a class to
|
|
|
|
your code blocks' attributes, and then running codebraid rather than
|
|
|
|
pandoc to convert your document from Markdown to another format.
|
|
|
|
codebraid supports almost all of pandoc's options and passes them to
|
|
|
|
pandoc internally.
|
|
|
|
|
|
|
|
Codebraid provides two options for executing code. It includes a built-in
|
|
|
|
code execution system that currently supports Python 3.5+, Julia, Rust,
|
|
|
|
R, Bash, and JavaScript. Code can also be executed using Jupyter kernels,
|
|
|
|
with support for rich output like plots.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ synthetica ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "codebraid";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|