2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pygame
|
2022-02-10 20:34:41 +00:00
|
|
|
, python-i18n
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygame-gui";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.6.4";
|
|
|
|
# nixpkgs-update: no auto update
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MyreMylar";
|
|
|
|
repo = "pygame_gui";
|
|
|
|
rev = "v_${lib.replaceStrings ["."] [""] version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "13+fK1hYxiMh0T+xbbmHViZjyBoQfRyIDc05fIJ/46U=";
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [ pygame python-i18n ];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pygame_gui/core/utility.py \
|
|
|
|
--replace "xsel" "${pkgs.xsel}/bin/xsel"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
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 ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
}
|