2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-05-15 15:35:15 +00:00
|
|
|
, setuptools
|
|
|
|
, pygame-ce
|
2022-02-10 20:34:41 +00:00
|
|
|
, python-i18n
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygame-gui";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0610";
|
|
|
|
pyproject = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MyreMylar";
|
|
|
|
repo = "pygame_gui";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v_${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-PVNi/I174AyEEjc+N2UGtgOYSGAgVQbqrKkWZnjOxFY=";
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pygame-ce
|
|
|
|
python-i18n
|
|
|
|
];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pygame_gui/core/utility.py \
|
2024-05-15 15:35:15 +00:00
|
|
|
--replace-fail "xsel" "${lib.getExe pkgs.xsel}"
|
2021-07-24 12:14:16 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
export SDL_VIDEODRIVER=dummy
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Clipboard doesn't exist in test environment
|
|
|
|
"test_process_event_text_ctrl_c"
|
|
|
|
"test_process_event_text_ctrl_v"
|
|
|
|
"test_process_event_text_ctrl_v_nothing"
|
|
|
|
"test_process_event_ctrl_v_over_limit"
|
|
|
|
"test_process_event_ctrl_v_at_limit"
|
|
|
|
"test_process_event_ctrl_v_over_limit_select_range"
|
|
|
|
"test_process_event_text_ctrl_v_select_range"
|
|
|
|
"test_process_event_text_ctrl_a"
|
|
|
|
"test_process_event_text_ctrl_x"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_performance/test_text_performance.py"
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A GUI system for pygame";
|
|
|
|
homepage = "https://github.com/MyreMylar/pygame_gui";
|
|
|
|
license = with licenses; [ mit ];
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau pbsds ];
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
}
|