summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/nbconflux/default.nix
blob: 660e9f80fee5d78eb4312f6eb6da28ad0134c1ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  nbconvert,
  pytestCheckHook,
  requests,
  responses,
  setuptools,
  versioneer,
}:

buildPythonPackage rec {
  pname = "nbconflux";
  version = "0.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "vericast";
    repo = "nbconflux";
    tag = version;
    hash = "sha256-kHIuboFKLVsu5zlZ0bM1BUoQR8f1l0XWcaaVI9bECJw=";
  };

  build-system = [
    setuptools
    versioneer
  ];

  dependencies = [
    nbconvert
    requests
  ];

  nativeCheckInputs = [
    pytestCheckHook
    responses
  ];

  patches = [
    # The original setup.py file is missing commas in the install_requires list
    ./setup-py.patch
  ];

  postPatch = ''
    # remove vendorized versioneer.py
    rm versioneer.py
  '';

  JUPYTER_PATH = "${nbconvert}/share/jupyter";
  disabledTests = [
    "test_post_to_confluence"
    "test_optional_components"
  ];

  meta = {
    description = "Converts Jupyter Notebooks to Atlassian Confluence (R) pages using nbconvert";
    mainProgram = "nbconflux";
    homepage = "https://github.com/Valassis-Digital-Media/nbconflux";
    license = lib.licenses.bsd3;
    maintainers = [ lib.maintainers.arnoldfarkas ];
  };
}