Files
nixpkgs/pkgs/development/python-modules/i3ipc/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
coreutils,
setuptools,
xlib,
fontconfig,
pytestCheckHook,
writableTmpDirAsHomeHook,
pytest-asyncio,
pytest-timeout,
pytest-xvfb,
i3,
xorg,
}:
buildPythonPackage rec {
pname = "i3ipc";
version = "2.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "altdesktop";
repo = "i3ipc-python";
tag = "v${version}";
hash = "sha256-JRwipvIF1zL/x2A+xEJKEFV6BlDnv2Xt/eyIzVrSf40=";
};
patches = [
# Upstream expects a very old version of pytest-asyncio. This patch correctly
# decorates async fixtures using pytest-asyncio and configures `loop_scope`
# where needed.
./fix-async-tests.patch
];
postPatch = ''
substituteInPlace test/i3.config \
--replace-fail /bin/true ${coreutils}/bin/true
'';
build-system = [ setuptools ];
dependencies = [ xlib ];
# Fontconfig error: Cannot load default config file
env.FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
nativeCheckInputs = [
pytestCheckHook
writableTmpDirAsHomeHook
pytest-asyncio
pytest-timeout
pytest-xvfb
i3
xorg.xdpyinfo
xorg.xvfb
];
disabledTestPaths = [
# Timeout
"test/test_shutdown_event.py::TestShutdownEvent::test_shutdown_event_reconnect"
"test/aio/test_shutdown_event.py::TestShutdownEvent::test_shutdown_event_reconnect"
# Flaky
"test/test_window.py::TestWindow::test_detailed_window_event"
"test/aio/test_workspace.py::TestWorkspace::test_workspace"
];
pythonImportsCheck = [ "i3ipc" ];
meta = {
description = "Improved Python library to control i3wm and sway";
homepage = "https://github.com/altdesktop/i3ipc-python";
changelog = "https://github.com/altdesktop/i3ipc-python/releases/tag/${src.tag}";
license = lib.licenses.bsd3;
};
}