File: mkdocs.nix

package info (click to toggle)
python-parse-stages 0.1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: python: 505; sh: 42; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

{ pkgs ? import <nixpkgs> { }
, py-ver ? "11"
}:
let
  python-name = "python3${py-ver}";
  python = builtins.getAttr python-name pkgs;
  python-pkgs = python.withPackages (p: with p;
    [
      mkdocs
      mkdocs-material
      mkdocstrings
      mkdocstrings-python
    ]
  );
in
pkgs.mkShell {
  buildInputs = [ python-pkgs ];
  shellHook = ''
    set -e
    rm -rf site
    python3.${py-ver} -m mkdocs build
    exit
  '';
}