summary refs log tree commit diff
path: root/pkgs/development/python-modules/supervise_api/default.nix
blob: 7d4c7f4e3f8bd35deaad17b329ab4483655f2527 (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
{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, supervise
, isPy3k
, whichcraft
, util-linux
}:

buildPythonPackage rec {
  pname = "supervise_api";
  version = "0.6.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de";
  };

  patches = [
    (substituteAll {
      src = ./supervise-path.patch;
      inherit supervise;
    })
  ];

  # In the git repo, supervise_api lives inside a python subdir
  patchFlags = [ "-p2" ];

  propagatedBuildInputs = lib.optional (!isPy3k) whichcraft;

  nativeCheckInputs = [ util-linux ];

  meta = {
    description = "An API for running processes safely and securely";
    homepage = "https://github.com/catern/supervise";
    license = lib.licenses.lgpl3;
    maintainers = with lib.maintainers; [ catern ];
  };
}