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