fix: build oraios-pywebview for serena

This commit is contained in:
2026-04-13 14:27:35 +02:00
parent 7f6a99a17c
commit a942638510
4 changed files with 70 additions and 28 deletions
+39
View File
@@ -0,0 +1,39 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonPackage rec {
pname = "oraios-pywebview";
version = "6.2";
pyproject = true;
src = fetchFromGitHub {
owner = "oraios";
repo = "pywebview";
tag = "v${version}";
hash = "sha256-i99O0UuyfepQHBTpeeL07TY7AbygP+/XFxX3Q8JluIU=";
};
build-system = [ python3Packages.setuptools-scm ];
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
dependencies = with python3Packages; [
bottle
pyside6
proxy-tools
qtpy
six
typing-extensions
];
pythonImportsCheck = [ "webview" ];
meta = {
description = "Lightweight cross-platform wrapper around a webview (oraios fork)";
homepage = "https://github.com/oraios/pywebview";
license = lib.licenses.bsd3;
};
}
+5 -6
View File
@@ -4,6 +4,7 @@
fetchFromGitHub,
pyright,
fortls,
oraios-pywebview,
}:
# TODO: We can just get this from nixpkgs when merged: https://github.com/NixOS/nixpkgs/pull/506300
python3Packages.buildPythonApplication (finalAttrs: {
@@ -33,10 +34,6 @@ python3Packages.buildPythonApplication (finalAttrs: {
# Remove fortls from Python dependencies and make it available at runtime instead
substituteInPlace pyproject.toml \
--replace-fail '"fortls==3.2.2",' ""
# Remove oraios-pywebview (custom fork, not in nixpkgs; only needed for GUI features)
substituteInPlace pyproject.toml \
--replace-fail '"oraios-pywebview==6.2",' ""
'';
build-system = [ python3Packages.hatchling ];
@@ -47,7 +44,9 @@ python3Packages.buildPythonApplication (finalAttrs: {
"--prefix PATH : ${lib.makeBinPath [ pyright fortls ]}"
];
dependencies = with python3Packages; [
dependencies = [
oraios-pywebview
] ++ (with python3Packages; [
anthropic
docstring-parser
beautifulsoup4
@@ -69,7 +68,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
tiktoken
tqdm
types-pyyaml
];
]);
optional-dependencies = with python3Packages; {
google = [ google-genai ];