diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2022-06-25 15:42:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 15:42:20 +0200 |
commit | c1c655b63de2ebc886fa1b8e594614f3c8cfd1b1 (patch) | |
tree | 595ae012c8e16af9299a4aef9cd5538c1d05102b /pkgs | |
parent | 41c91c48eee8801b91eb6c18ef763b11dc059047 (diff) | |
parent | 3f328a5108746708201815f6515d700dadc94f21 (diff) |
Merge pull request #178770 from jtojnar/pysystemd
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/systemd/default.nix | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/systemd/default.nix b/pkgs/development/python-modules/systemd/default.nix index 86c330bd1d880..b27af96edbd75 100644 --- a/pkgs/development/python-modules/systemd/default.nix +++ b/pkgs/development/python-modules/systemd/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchFromGitHub, systemd, pkg-config }: +{ lib +, buildPythonPackage +, fetchpatch +, fetchFromGitHub +, systemd +, pkg-config +}: buildPythonPackage rec { pname = "systemd"; @@ -11,14 +17,36 @@ buildPythonPackage rec { sha256 = "1fakw7qln44mfd6pj4kqsgyrhkc6cyr653id34kv0rdnb1bvysrz"; }; - buildInputs = [ systemd ]; - nativeBuildInputs = [ pkg-config ]; + 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="; + }) + ]; + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + systemd + ]; + + # No module named 'systemd._journal doCheck = false; + pythonImportsCheck = [ + "systemd.journal" + "systemd.id128" + "systemd.daemon" + "systemd.login" + ]; + meta = with lib; { description = "Python module for native access to the systemd facilities"; homepage = "http://www.freedesktop.org/software/systemd/python-systemd/"; - license = licenses.lgpl21; + license = licenses.lgpl21Plus; }; } |