at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 systemd, 7 lxml, 8 psutil, 9 pytestCheckHook, 10 pkg-config, 11 cython, 12}: 13 14buildPythonPackage rec { 15 pname = "pystemd"; 16 version = "0.13.4"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "systemd"; 21 repo = "pystemd"; 22 tag = "v${version}"; 23 hash = "sha256-Ph0buiyH2cLRXyqgA8DmpE9crb/x8OaerIoZuv8hjMI="; 24 }; 25 26 buildInputs = [ systemd ]; 27 28 build-system = [ 29 setuptools 30 cython 31 ]; 32 33 nativeBuildInputs = [ 34 pkg-config 35 ]; 36 37 dependencies = [ 38 lxml 39 psutil 40 ]; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 ]; 45 46 # Having the source root in `sys.path` causes import issues 47 preCheck = '' 48 cd tests 49 ''; 50 51 disabledTestPaths = [ 52 "test_version.py" # Requires cstq which is not in nixpkgs 53 ]; 54 55 pythonImportsCheck = [ "pystemd" ]; 56 57 meta = { 58 description = '' 59 Thin Cython-based wrapper on top of libsystemd, focused on exposing the 60 dbus API via sd-bus in an automated and easy to consume way 61 ''; 62 homepage = "https://github.com/facebookincubator/pystemd"; 63 changelog = "https://github.com/systemd/pystemd/releases/tag/${src.tag}"; 64 license = lib.licenses.lgpl21Plus; 65 maintainers = with lib.maintainers; [ flokli ]; 66 }; 67}