1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 sphinx, 6 setuptools, 7}: 8 9buildPythonPackage rec { 10 pname = "sphinxext-rediraffe"; 11 version = "0.2.7"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "wpilibsuite"; 16 repo = "sphinxext-rediraffe"; 17 tag = "v${version}"; 18 hash = "sha256-g+GD1ApD26g6PwPOH/ir7aaEgH+n1QQYSr9QizYrmug="; 19 }; 20 21 postPatch = '' 22 # Fixes "packaging.version.InvalidVersion: Invalid version: 'main'" 23 substituteInPlace setup.py \ 24 --replace-fail 'version = "main"' 'version = "${version}"' 25 ''; 26 27 build-system = [ 28 setuptools 29 ]; 30 31 dependencies = [ 32 sphinx 33 ]; 34 35 # tests require seleniumbase which is not currently in nixpkgs 36 doCheck = false; 37 38 pythonImportsCheck = [ "sphinxext.rediraffe" ]; 39 40 pythonNamespaces = [ "sphinxext" ]; 41 42 meta = { 43 description = "Sphinx extension to redirect files"; 44 homepage = "https://github.com/wpilibsuite/sphinxext-rediraffe"; 45 changelog = "https://github.com/wpilibsuite/sphinxext-rediraffe/releases/tag/v${version}"; 46 license = lib.licenses.mit; 47 maintainers = [ lib.maintainers.newam ]; 48 }; 49}