fix: build oraios-pywebview for serena
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -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 ];
|
||||
|
||||
Reference in New Issue
Block a user