Merge pull request #130328 from angustrau/pygame-gui

python3Packages.pygame-gui: init at 0.5.7
This commit is contained in:
Sandro 2021-07-22 12:53:52 +02:00 committed by GitHub
commit d1aa855491
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,53 @@
{ lib
, pkgs
, buildPythonPackage
, fetchFromGitHub
, pygame
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pygame-gui";
version = "0.5.7";
src = fetchFromGitHub {
owner = "MyreMylar";
repo = "pygame_gui";
rev = "v_${lib.replaceStrings ["."] [""] version}";
sha256 = "4P2PT8/7oA5Q7H4+pm7BOET7w05pQYQltXVV3+YVrVE=";
};
propagatedBuildInputs = [ pygame ];
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"
];
meta = with lib; {
description = "A GUI system for pygame";
homepage = "https://github.com/MyreMylar/pygame_gui";
license = with licenses; [ mit ];
maintainers = with maintainers; [ angustrau ];
};
}

View file

@ -6007,6 +6007,8 @@ in {
pygame_sdl2 = callPackage ../development/python-modules/pygame_sdl2 { };
pygame-gui = callPackage ../development/python-modules/pygame-gui { };
pygatt = callPackage ../development/python-modules/pygatt { };
pygbm = callPackage ../development/python-modules/pygbm { };