summary refs log tree commit diff
path: root/pkgs/development/python-modules/daemonocle/default.nix
blob: 0bdc795159ca287e2545a427163dbaf3c55e896b (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, click
, psutil
, pytestCheckHook
, lsof
}:

buildPythonPackage rec {
  pname = "daemonocle";
  version = "1.2.3";

  src = fetchFromGitHub {
    owner = "jnrbsn";
    repo = "daemonocle";
    rev = "v${version}";
    hash = "sha256-K+IqpEQ4yhfSguPPm2Ult3kGNO/9H56B+kD5ntaCZdk=";
  };

  propagatedBuildInputs = [
    click
    psutil
  ];

  checkInputs = [
    pytestCheckHook
    lsof
  ];

  # One third of the tests fail on the sandbox with
  # "psutil.NoSuchProcess: no process found with pid 0".
  disabledTests = [
    "sudo"
    "test_chrootdir_without_permission"
    "test_uid_and_gid_without_permission"
    "test_multi_daemon"
    "test_multi_daemon_action_worker_id"
    "test_exec_worker"
  ];

  pythonImportsCheck = [
    "daemonocle"
  ];

  meta = with lib; {
    description = "A Python library for creating super fancy Unix daemons";
    longDescription = ''
      daemonocle is a library for creating your own Unix-style daemons
      written in Python.  It solves many problems that other daemon
      libraries have and provides some really useful features you don't
      often see in other daemons.
    '';
    homepage = "https://github.com/jnrbsn/daemonocle";
    license = licenses.mit;
    maintainers = with maintainers; [ AluisioASG ];
    platforms = platforms.unix;
  };
}