2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchpatch
|
|
|
|
, fetchFromGitHub
|
|
|
|
, systemd
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "systemd";
|
|
|
|
version = "234";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "systemd";
|
|
|
|
repo = "python-systemd";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1fakw7qln44mfd6pj4kqsgyrhkc6cyr653id34kv0rdnb1bvysrz";
|
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
patches = [
|
|
|
|
# Fix runtime issues on Python 3.10
|
|
|
|
# https://github.com/systemd/python-systemd/issues/107
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/systemd/python-systemd/commit/c71bbac357f0ac722e1bcb2edfa925b68cca23c9.patch";
|
|
|
|
sha256 = "22s72Wa/BCwNNvwbxEUh58jhHlbA00SNwNVchVDovcc=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
# No module named 'systemd._journal
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"systemd.journal"
|
|
|
|
"systemd.id128"
|
|
|
|
"systemd.daemon"
|
|
|
|
"systemd.login"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python module for native access to the systemd facilities";
|
|
|
|
homepage = "http://www.freedesktop.org/software/systemd/python-systemd/";
|
2022-06-26 10:26:21 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|