Files
nixpkgs/pkgs/development/python-modules/mss/default.nix
Fabian Affolter d363998154 python3Packages.mss: 10.1.0 -> 10.2.0
https://github.com/BoboTiG/python-mss/blob/v10.2.0/CHANGELOG.md

This commit was automatically generated using update-python-libraries.
2026-08-25 01:24:36 +02:00

75 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
stdenv,
replaceVars,
# build-system
hatchling,
# native dependencies
libxrandr,
libxfixes,
libx11,
# tests
lsof,
pillow,
pytest-cov-stub,
pytest-rerunfailures,
pytest,
pyvirtualdisplay,
xvfb-run,
}:
buildPythonPackage rec {
pname = "mss";
version = "10.2.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-qycYYHdVReYvKdexH4LyeawQSPW73SbPrYSDAgjb05M=";
};
patches = lib.optionals stdenv.hostPlatform.isLinux [
(replaceVars ./linux-paths.patch {
x11 = "${libx11}/lib/libX11.so";
xfixes = "${libxfixes}/lib/libXfixes.so";
xrandr = "${libxrandr}/lib/libXrandr.so";
})
];
build-system = [ hatchling ];
doCheck = stdenv.hostPlatform.isLinux;
nativeCheckInputs = [
lsof
pillow
pytest-cov-stub
pytest-rerunfailures
pytest
pyvirtualdisplay
xvfb-run
];
checkPhase = ''
runHook preCheck
xvfb-run pytest -v -k "not test_grab_with_tuple and not test_grab_with_tuple_percents and not test_resource_leaks"
runHook postCheck
'';
pythonImportsCheck = [ "mss" ];
meta = {
description = "Cross-platform multiple screenshots module";
mainProgram = "mss";
homepage = "https://github.com/BoboTiG/python-mss";
changelog = "https://github.com/BoboTiG/python-mss/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ austinbutler ];
};
}