11 buildPythonPackage rec {
14 format = "setuptools";
16 src = fetchFromGitHub {
18 repo = "python-systemd";
20 hash = "sha256-8p4m4iM/z4o6PHRQIpuSXb64tPTWGlujEYCDVLiIt2o=";
36 echo "12345678901234567890123456789012" > machine-id
37 export NIX_REDIRECTS=/etc/machine-id=$(realpath machine-id) \
38 LD_PRELOAD=${libredirect}/lib/libredirect.so
40 # Those tests assume /etc/machine-id to be available
41 # But our redirection technique does not work apparently
42 pytest $out/${python.sitePackages}/systemd -k 'not test_get_machine and not test_get_machine_app_specific and not test_reader_this_machine'
45 pythonImportsCheck = [
53 description = "Python module for native access to the systemd facilities";
54 homepage = "https://www.freedesktop.org/software/systemd/python-systemd/";
55 changelog = "https://github.com/systemd/python-systemd/blob/v${version}/NEWS";
56 license = licenses.lgpl21Plus;
57 maintainers = with maintainers; [ raitobezarius ];