squiggle/packages/squiggle-lang/__tests__/docs/default.nix

34 lines
885 B
Nix
Raw Normal View History

{ chan ? "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31" # 21.11
, pkgs ? import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/${chan}.tar.gz"; }) {}
}:
# Style sheets https://github.com/citation-style-language/styles/
with pkgs;
let deps = [
# (texlive.combine
# { inherit (texlive)
# scheme-small thmtools datetime xpatch fmtcount;
# }
# )
haskellPackages.pandoc
];
in
stdenv.mkDerivation {
name = "render_squiggle_properties";
src = ./.;
buildInputs = deps;
buildPhase = ''
echo rendering...
pandoc \
--from markdown \
--to latex \
--out properties.pdf \
--pdf-engine xelatex \
properties.md \
echo rendered.
'';
installPhase = ''
mkdir -p $out
cp properties.pdf $out/properties.pdf
'';
}