{
  lib,
  fetchFromGitHub,
  python3,
}:

python3.pkgs.buildPythonApplication (finalAttrs: {
  pname = "world-wall-clock";
  version = "0.1.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ddelabru";
    repo = "world-wall-clock";
    tag = "v${finalAttrs.version}";
    hash = "sha256-gwJvoXSq8H+sMTyBEA1N+KxnkGxyt5Ev+V3awCBiILg=";
  };

  build-system = with python3.pkgs; [ poetry-core ];

  dependencies = with python3.pkgs; [
    tzdata
    urwid
    xdg-base-dirs
  ];

  pythonRelaxDeps = [
    "urwid"
  ];

  nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];

  enabledTestPaths = [ "tests/*" ];

  disabledTests = [
    # requires real tty
    "test_run_app"
  ];

  meta = {
    description = "TUI application that provides a multi-timezone graphical clock in a terminal environment";
    homepage = "https://github.com/ddelabru/world-wall-clock";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ddelabru ];
    mainProgram = "wwclock";
    platforms = lib.platforms.all;
  };
})
