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