1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonRelaxDepsHook,
6
7 # build-system
8 poetry-core,
9 poetry-dynamic-versioning,
10
11 # dependencies
12 docutils,
13 pygments,
14 sphinx,
15
16 # tests
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "sphinx-prompt";
22 version = "1.7.0"; # read before updating past 1.7.0 https://github.com/sbrunner/sphinx-prompt/issues/398
23 format = "pyproject";
24
25 src = fetchFromGitHub {
26 owner = "sbrunner";
27 repo = "sphinx-prompt";
28 rev = "refs/tags/${version}";
29 hash = "sha256-/XxUSsW8Bowks7P+d6iTlklyMIfTb2otXva/VtRVAkM=";
30 };
31
32 postPatch = ''
33 substituteInPlace pyproject.toml \
34 --replace '"poetry-plugin-tweak-dependencies-version", ' ""
35 '';
36
37 nativeBuildInputs = [
38 poetry-core
39 poetry-dynamic-versioning
40 pythonRelaxDepsHook
41 ];
42
43 pythonRelaxDeps = [
44 "docutils"
45 "pygments"
46 "Sphinx"
47 ];
48
49 propagatedBuildInputs = [
50 docutils
51 pygments
52 sphinx
53 ];
54
55 nativeCheckInputs = [ pytestCheckHook ];
56
57 # versions >=1.8.0 cannot be build from source
58 passthru.skipBulkUpdate = true;
59
60 meta = with lib; {
61 description = "A sphinx extension for creating unselectable prompt";
62 homepage = "https://github.com/sbrunner/sphinx-prompt";
63 license = licenses.bsd3;
64 maintainers = with maintainers; [ kaction ];
65 };
66}