1{ lib
2, buildPythonPackage
3, fetchPypi
4, substituteAll
5, supervise
6, isPy3k
7, whichcraft
8, util-linux
9}:
10
11buildPythonPackage rec {
12 pname = "supervise_api";
13 version = "0.6.0";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de";
18 };
19
20 patches = [
21 (substituteAll {
22 src = ./supervise-path.patch;
23 inherit supervise;
24 })
25 ];
26
27 # In the git repo, supervise_api lives inside a python subdir
28 patchFlags = [ "-p2" ];
29
30 propagatedBuildInputs = lib.optional (!isPy3k) whichcraft;
31
32 checkInputs = [ util-linux ];
33
34 meta = {
35 description = "An API for running processes safely and securely";
36 homepage = "https://github.com/catern/supervise";
37 license = lib.licenses.lgpl3;
38 maintainers = with lib.maintainers; [ catern ];
39 };
40}