2020-07-18 16:06:22 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
|
|
|
, importlib-resources, pytest, xvfb_run }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pywebview";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "3.3.1";
|
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "r0x0r";
|
|
|
|
repo = "pywebview";
|
|
|
|
rev = version;
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "015z7n0hdgkzn0p7aw1xsv6lwc260p8q67jx0zyd1zghnwyj8k79";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ importlib-resources ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest xvfb_run ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pushd tests
|
|
|
|
patchShebangs run.sh
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' ./run.sh
|
|
|
|
popd
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/r0x0r/pywebview";
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "Lightweight cross-platform wrapper around a webview";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jojosch ];
|
|
|
|
};
|
|
|
|
}
|