summary refs log tree commit diff
path: root/pkgs/tools/misc/pubs/default.nix
blob: aa8c43b7cdd75256632e0bae9a99f80d7df96e13 (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
{ stdenv, fetchFromGitHub, python3Packages }:

python3Packages.buildPythonApplication rec {
  name = "pubs-${version}";
  version = "0.7.0";

  src = fetchFromGitHub {
    owner = "pubs";
    repo = "pubs";
    rev = "v${version}";
    sha256 = "0n5wbjx9wqy6smfg625mhma739jyg7c92766biaiffp0a2bzr475";
  };

  propagatedBuildInputs = with python3Packages; [
    dateutil configobj bibtexparser pyyaml requests beautifulsoup4
    pyfakefs ddt
  ];

  preCheck = ''
    # API tests require networking
    rm tests/test_apis.py

    # pyfakefs works weirdly in the sandbox
    export HOME=/
  '';

  meta = with stdenv.lib; {
    description = "Command-line bibliography manager";
    homepage = https://github.com/pubs/pubs;
    license = licenses.lgpl3;
    maintainers = with maintainers; [ gebner ];
    platforms = platforms.all;
  };
}