add katex

This commit is contained in:
Vivian 2023-09-08 13:43:04 +02:00
parent f4393f8791
commit 8e9413786a
3 changed files with 31 additions and 29 deletions

View file

@ -1,17 +0,0 @@
pipeline:
nix:
image: nixos/nix
environment:
- NIX_CONFIG=experimental-features = nix-command flakes
commands:
- nix flake check
- nix build '.#mdbook-toc'
publish:
image: git.0x76.dev/v/push-nix-container:0.3.3
settings:
username: v
password:
from_secret: registry_password
package: container # nix os package to build
repo: git.0x76.dev
image: v/mdbook-container

View file

@ -1,12 +1,15 @@
{ {
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1692799911,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1671200928, "lastModified": 1693985761,
"narHash": "sha256-mZfzDyzojwj6I0wyooIjGIn81WtGVnx6+avU5Wv+VKU=", "narHash": "sha256-K5b+7j7Tt3+AqbWkcw+wMeqOAWyCD1MH26FPZyWXpdo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "757b82211463dd5ba1475b6851d3731dfe14d377", "rev": "0bffda19b8af722f8069d09d8b6a24594c80b352",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,6 +39,21 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,5 +1,5 @@
{ {
description = "an container for mdbook with the toc plugin"; description = "an container for mdbook with various plugins";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
@ -11,29 +11,30 @@
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
in { in {
packages = rec { packages = rec {
default = mdbook-toc; default = container;
container = pkgs.dockerTools.buildLayeredImage { container = pkgs.dockerTools.buildLayeredImage {
name = "mdbook-container"; name = "mdbook-container";
tag = "0.4.0";
contents = [ contents = [
(pkgs.buildEnv { (pkgs.buildEnv {
name = "mdbook-env"; name = "mdbook-env";
paths = with pkgs; [ busybox mdbook mdbook-toc ]; paths = with pkgs; [ busybox mdbook mdbook-toc mdbook-katex ];
}) })
]; ];
config.Cmd = [ "${pkgs.mdbook}/bin/mdbook" ]; config.Cmd = [ "${pkgs.mdbook}/bin/mdbook" ];
}; };
mdbook-toc = pkgs.rustPlatform.buildRustPackage rec { mdbook-toc = pkgs.rustPlatform.buildRustPackage rec {
pname = "mdbook-toc"; pname = "mdbook-toc";
version = "0.11.0"; version = "0.14.1";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "badboy"; owner = "badboy";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-ORJV2+Uh8GwXU+EWUQ2ls+AcplYbpYhl6hvCuFdKpTk="; sha256 = "sha256-F0dIqtDEOVUXlWhmXKPOaJTEuA3Tl3h0vaEu7VsBo7s=";
}; };
cargoSha256 = "sha256-s+xlrHaynHTMmm7rfjYrWNlIJRHO0QTjMlcV+LjqHNs="; cargoSha256 = "sha256-gbBX6Hj+271BA9FWmkZdyR0tMP2Lny7UgW0o+kZe9bU=";
}; };
}; };
}); });