1{ lib 2, pkgs 3, buildPythonPackage 4, fetchFromGitHub 5, pygame 6, python-i18n 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "pygame-gui"; 12 version = "069"; 13 # nixpkgs-update: no auto update 14 15 src = fetchFromGitHub { 16 owner = "MyreMylar"; 17 repo = "pygame_gui"; 18 rev = "refs/tags/v_${version}"; 19 hash = "sha256-IXU00Us1odbfS7jLPMYuCPv2l/5TUZdYKES7xHs+EWg="; 20 }; 21 22 propagatedBuildInputs = [ pygame python-i18n ]; 23 24 postPatch = '' 25 substituteInPlace pygame_gui/core/utility.py \ 26 --replace "xsel" "${pkgs.xsel}/bin/xsel" 27 ''; 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 preCheck = '' 32 export HOME=$TMPDIR 33 export SDL_VIDEODRIVER=dummy 34 ''; 35 36 disabledTests = [ 37 # Clipboard doesn't exist in test environment 38 "test_process_event_text_ctrl_c" 39 "test_process_event_text_ctrl_v" 40 "test_process_event_text_ctrl_v_nothing" 41 "test_process_event_ctrl_v_over_limit" 42 "test_process_event_ctrl_v_at_limit" 43 "test_process_event_ctrl_v_over_limit_select_range" 44 "test_process_event_text_ctrl_v_select_range" 45 "test_process_event_text_ctrl_a" 46 "test_process_event_text_ctrl_x" 47 ]; 48 49 disabledTestPaths = [ 50 "tests/test_performance/test_text_performance.py" 51 ]; 52 53 meta = with lib; { 54 description = "A GUI system for pygame"; 55 homepage = "https://github.com/MyreMylar/pygame_gui"; 56 license = with licenses; [ mit ]; 57 maintainers = with maintainers; [ emilytrau ]; 58 }; 59}