about summary refs log tree commit diff
path: root/pkgs/tools/misc/pubs/default.nix
blob: b02aeb8aefb6a88b1e085367a79bde1424e16566 (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "pubs";
  version = "0.9.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pubs";
    repo = "pubs";
    rev = "refs/tags/v${version}";
    hash = "sha256-U/9MLqfXrzYVGttFSafw4pYDy26WgdsJMCxciZzO1pw=";
  };

  patches = [
    # https://github.com/pubs/pubs/pull/278
    (fetchpatch {
      url = "https://github.com/pubs/pubs/commit/9623d2c3ca8ff6d2bb7f6c8d8624f9a174d831bc.patch";
      hash = "sha256-6qoufKPv3k6C9BQTZ2/175Nk7zWPh89vG+zebx6ZFOk=";
    })
    # https://github.com/pubs/pubs/pull/279
    (fetchpatch {
      url = "https://github.com/pubs/pubs/commit/05e214eb406447196c77c8aa3e4658f70e505f23.patch";
      hash = "sha256-UBkKiYaG6y6z8lsRpdcsaGsoklv6qj07KWdfkQcVl2g=";
    })
  ];

  nativeBuildInputs = with python3.pkgs; [
    setuptools
  ];

  propagatedBuildInputs = with python3.pkgs; [
    argcomplete
    beautifulsoup4
    bibtexparser
    configobj
    feedparser
    python-dateutil
    pyyaml
    requests
    six
  ];

  nativeCheckInputs = with python3.pkgs; [
    ddt
    mock
    pyfakefs
    pytestCheckHook
  ];

  disabledTestPaths = [
    # Disabling git tests because they expect git to be preconfigured
    # with the user's details. See
    # https://github.com/NixOS/nixpkgs/issues/94663
    "tests/test_git.py"
  ];

  disabledTests = [
    # https://github.com/pubs/pubs/issues/276
    "test_readme"
    # AssertionError: Lists differ: ['Ini[112 chars]d to...
    "test_add_non_standard"
  ];

  pythonImportsCheck = [
    "pubs"
  ];

  meta = with lib; {
    description = "Command-line bibliography manager";
    homepage = "https://github.com/pubs/pubs";
    changelog = "https://github.com/pubs/pubs/blob/v${version}/changelog.md";
    license = licenses.lgpl3Only;
    maintainers = with maintainers; [ gebner dotlambda ];
  };
}