summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sphinxext-rediraffe/default.nix
blob: 9e80cea5e72507288ca87569bf38c5faaab30ec5 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  sphinx,
  setuptools,
}:

buildPythonPackage rec {
  pname = "sphinxext-rediraffe";
  version = "0.2.7";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "wpilibsuite";
    repo = "sphinxext-rediraffe";
    tag = "v${version}";
    hash = "sha256-g+GD1ApD26g6PwPOH/ir7aaEgH+n1QQYSr9QizYrmug=";
  };

  postPatch = ''
    # Fixes "packaging.version.InvalidVersion: Invalid version: 'main'"
    substituteInPlace setup.py \
      --replace-fail 'version = "main"' 'version = "${version}"'
  '';

  build-system = [
    setuptools
  ];

  dependencies = [
    sphinx
  ];

  # tests require seleniumbase which is not currently in nixpkgs
  doCheck = false;

  pythonImportsCheck = [ "sphinxext.rediraffe" ];

  pythonNamespaces = [ "sphinxext" ];

  meta = {
    description = "Sphinx extension to redirect files";
    homepage = "https://github.com/wpilibsuite/sphinxext-rediraffe";
    changelog = "https://github.com/wpilibsuite/sphinxext-rediraffe/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.newam ];
  };
}