Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sphinx-jupyterbook-latex / default.nix
blob5dff846924d8a59bfa8878d1745f952a12231789
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchPypi
5 , sphinx
6 , importlib-resources
7 }:
9 buildPythonPackage rec {
10   pname = "sphinx-jupyterbook-latex";
11   version = "0.5.2";
12   format = "pyproject";
14   disabled = pythonOlder "3.6";
16   src = fetchPypi {
17     inherit version;
18     pname = "sphinx_jupyterbook_latex";
19     hash = "sha256-2h060Cj1XdvxC5Ewu58k/GDK+2ccvTnf2VU3qvyQly4=";
20   };
22   postPatch = ''
23     substituteInPlace setup.cfg \
24       --replace "sphinx>=4,<5.1" "sphinx"
25   '';
27   propagatedBuildInputs = [ sphinx ]
28     ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
30   pythonImportsCheck = [ "sphinx_jupyterbook_latex" ];
32   meta = with lib; {
33     description = "Latex specific features for jupyter book";
34     homepage = "https://github.com/executablebooks/sphinx-jupyterbook-latex";
35     changelog = "https://github.com/executablebooks/sphinx-jupyterbook-latex/raw/v${version}/CHANGELOG.md";
36     license = licenses.bsd3;
37     maintainers = with maintainers; [ marsam ];
38   };