about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/mike/default.nix
blob: 9a48dca546993bd42379742b88f2e6d5ba875a10 (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib
, buildPythonPackage
, fetchFromGitHub
, git
, importlib-metadata
, importlib-resources
, jinja2
, mkdocs
, pythonOlder
, pyyaml
, unittestCheckHook
, verspec
}:

buildPythonPackage rec {
  pname = "mike";
  version = "unstable-2023-05-06";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "jimporter";
    repo = pname;
    rev = "300593c338b18f61f604d18457c351e166318020";
    hash = "sha256-Sjj2275IJDtLjG6uO9h4FbgxXTMgqD8c/rJj6iOxfuI=";
  };

  propagatedBuildInputs = [
    importlib-metadata
    importlib-resources
    jinja2
    mkdocs
    pyyaml
    verspec
  ];

  nativeCheckInputs = [
    git
    unittestCheckHook
  ];

  preCheck = ''
    export PATH=$out/bin:$PATH
  '';

  # Difficult to setup
  doCheck = false;

  pythonImportsCheck = [
    "mike"
  ];

  meta = with lib; {
    description = "Manage multiple versions of your MkDocs-powered documentation";
    mainProgram = "mike";
    homepage = "https://github.com/jimporter/mike";
    license = licenses.bsd3;
    maintainers = with maintainers; [ marsam ];
  };
}