2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
sphinx,
|
|
|
|
sphinx-autoapi,
|
|
|
|
sphinx-prompt,
|
|
|
|
sphinx-rtd-theme,
|
|
|
|
sphinx-tabs,
|
|
|
|
sphinxemoji,
|
|
|
|
sphinxHook,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Latest tagged release release "1.1.2" (Nov 2018) does not contain
|
|
|
|
# documenation, it was added in commits Aug 10, 2019. Repository does not have
|
|
|
|
# any activity since then.
|
2023-11-16 04:20:00 +00:00
|
|
|
buildPythonPackage {
|
2023-02-02 18:25:31 +00:00
|
|
|
pname = "sphinx-version-warning";
|
|
|
|
version = "unstable-2019-08-10";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "humitos";
|
|
|
|
repo = "sphinx-version-warning";
|
|
|
|
rev = "a82156c2ea08e5feab406514d0ccd9d48a345f48";
|
|
|
|
hash = "sha256-WnJYMk1gPLT0dBn7lmxVDNVkLYkDCgQOtM9fQ3kc6k0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
# It tries to write to file relative to it own location at runtime
|
|
|
|
# and gets permission denied, since Nix store is immutable.
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/humitos/sphinx-version-warning/commit/cb1b47becf2a0d3b2570ca9929f42f7d7e472b6f.patch";
|
|
|
|
hash = "sha256-Vj0QAHIBmc0VxE+TTmJePzvr5nc45Sn2qqM+C/pkgtM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
sphinx-autoapi
|
2024-01-25 14:12:00 +00:00
|
|
|
sphinx-prompt
|
2023-02-02 18:25:31 +00:00
|
|
|
sphinx-rtd-theme
|
|
|
|
sphinx-tabs
|
|
|
|
sphinxemoji
|
2024-01-25 14:12:00 +00:00
|
|
|
sphinxHook
|
|
|
|
setuptools
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ sphinx ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "versionwarning" ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Sphinx extension to show a warning banner at the top of your documentation";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/humitos/sphinx-version-warning";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/humitos/sphinx-version-warning/blob/${version}/CHANGELOG.rst";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kaction ];
|
|
|
|
};
|
|
|
|
}
|