1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
2, importlib-resources, pytest, xvfb_run }:
3
4buildPythonPackage rec {
5 pname = "pywebview";
6 version = "3.3.1";
7 disabled = pythonOlder "3.5";
8
9 src = fetchFromGitHub {
10 owner = "r0x0r";
11 repo = "pywebview";
12 rev = version;
13 sha256 = "015z7n0hdgkzn0p7aw1xsv6lwc260p8q67jx0zyd1zghnwyj8k79";
14 };
15
16 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ importlib-resources ];
17
18 checkInputs = [ pytest xvfb_run ];
19
20 checkPhase = ''
21 pushd tests
22 patchShebangs run.sh
23 xvfb-run -s '-screen 0 800x600x24' ./run.sh
24 popd
25 '';
26
27 meta = with lib; {
28 homepage = "https://github.com/r0x0r/pywebview";
29 description = "Lightweight cross-platform wrapper around a webview";
30 license = licenses.bsd3;
31 maintainers = with maintainers; [ jojosch ];
32 };
33}