1{
2 buildPythonPackage,
3 lib,
4 fetchPypi,
5 systemd,
6 lxml,
7 psutil,
8 pytest,
9 mock,
10 pkg-config,
11}:
12
13buildPythonPackage rec {
14 pname = "pystemd";
15 version = "0.13.2";
16 format = "setuptools";
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-Tc+ksTpVaFxJ09F8EGMeyhjDN3D2Yxb47yM3uJUcwUQ=";
20 };
21
22 buildInputs = [ systemd ];
23
24 nativeBuildInputs = [ pkg-config ];
25
26 propagatedBuildInputs = [
27 lxml
28 psutil
29 ];
30
31 nativeCheckInputs = [
32 mock
33 pytest
34 ];
35
36 checkPhase = "pytest tests";
37
38 meta = with lib; {
39 description = ''
40 Thin Cython-based wrapper on top of libsystemd, focused on exposing the
41 dbus API via sd-bus in an automated and easy to consume way
42 '';
43 homepage = "https://github.com/facebookincubator/pystemd/";
44 license = licenses.lgpl21Plus;
45 maintainers = with maintainers; [ flokli ];
46 };
47}