1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 fetchpatch,
7 mock,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "supervisor";
15 version = "4.2.5";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-NHYbrhojxYGSKBpRFfsH+/IsmwEzwIFmvv/HD+0+vBI=";
23 };
24
25 patches = [
26 # adapted from 49b74cafb6e72e0e620e321711c1b81a0823be12
27 ./fix-python313-unittest.patch
28 # Fix SubprocessTests.test_getProcessStateDescription on python 3.13
29 (fetchpatch {
30 url = "https://github.com/Supervisor/supervisor/commit/27efcd59b454e4f3a81e5e1b02ab0d8d0ff2f45f.patch";
31 hash = "sha256-9KNcdRJwnZJA00dDy/mAS7RJuBei60YzVhWkeQgmJ8c=";
32 })
33 ];
34
35 propagatedBuildInputs = [ setuptools ];
36
37 # wants to write to /tmp/foo which is likely already owned by another
38 # nixbld user on hydra
39 doCheck = !stdenv.hostPlatform.isDarwin;
40
41 nativeCheckInputs = [
42 mock
43 pytestCheckHook
44 ];
45
46 pythonImportsCheck = [ "supervisor" ];
47
48 meta = with lib; {
49 description = "System for controlling process state under UNIX";
50 homepage = "https://supervisord.org/";
51 changelog = "https://github.com/Supervisor/supervisor/blob/${version}/CHANGES.rst";
52 license = licenses.free; # http://www.repoze.org/LICENSE.txt
53 maintainers = with maintainers; [ zimbatm ];
54 };
55}