From 7f6a99a17ca545135966f3fbed76be53a9b78ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20J=C3=B6rg?= Date: Mon, 13 Apr 2026 11:49:42 +0200 Subject: [PATCH] fix(serena): Update to 1.1.1 --- default.nix | 15 ++++++++------- flake.nix | 33 +++++++++++++++++++++++++++++++-- pkgs/serena/package.nix | 35 ++++++++++++++++++----------------- 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/default.nix b/default.nix index b6a3ebe..153421c 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,12 @@ -let - sources = import ./npins; - system = builtins.currentSystem; - pkgs = import sources.nixpkgs { +{ + sources ? import ./npins, + system ? builtins.currentSystem, + pkgs ? import sources.nixpkgs { inherit system; config.allowUnfree = true; - }; - + }, +}: +let claudeCode = pkgs.callPackage "${sources.claude-code-nix}/package.nix" { }; serena = pkgs.callPackage ./pkgs/serena/package.nix { }; @@ -138,7 +139,7 @@ in if [ -e ~/.nuget ]; then export NUGET_DIR=~/.nuget - else + else mkdir -p $CONFIG_DIR/nuget export NUGET_DIR=$CONFIG_DIR/nuget fi diff --git a/flake.nix b/flake.nix index e3b41bd..c94031c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,34 @@ { - description = "claude-vm"; + outputs = + { self }: + let + sources = import ./npins; - outputs = { self }: import ./default.nix; + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = + f: + builtins.listToAttrs ( + map (system: { + name = system; + value = f system; + }) systems + ); + in + { + packages = forAllSystems ( + system: + let + pkgs = import sources.nixpkgs { inherit system; }; + in + { + default = (import ./default.nix { inherit system; }).claude-vm; + } + ); + }; } diff --git a/pkgs/serena/package.nix b/pkgs/serena/package.nix index b0edfe3..23cdf32 100644 --- a/pkgs/serena/package.nix +++ b/pkgs/serena/package.nix @@ -3,12 +3,12 @@ python3Packages, fetchFromGitHub, pyright, + fortls, }: # TODO: We can just get this from nixpkgs when merged: https://github.com/NixOS/nixpkgs/pull/506300 - python3Packages.buildPythonApplication (finalAttrs: { pname = "serena"; - version = "0.1.4"; + version = "1.1.1"; pyproject = true; disabled = python3Packages.pythonOlder "3.11"; @@ -17,33 +17,41 @@ python3Packages.buildPythonApplication (finalAttrs: { owner = "oraios"; repo = "serena"; tag = "v${finalAttrs.version}"; - hash = "sha256-oj5iaQZa9gKjjaqq/DDT0j5UqVbPjWEztSuaOH24chI="; + hash = "sha256-3MPlJvXt83C7dBxYrCe1or3UYWMZ1poSg3PBmVXj0mA="; }; postPatch = '' # Remove the deprecated dotenv stub package (serena uses python-dotenv) substituteInPlace pyproject.toml \ - --replace-fail '"dotenv>=0.9.9",' "" + --replace-fail '"dotenv==0.9.9",' "" # Remove pyright from Python dependencies and make it available at runtime # instead substituteInPlace pyproject.toml \ - --replace-fail '"pyright>=1.1.396,<2",' "" + --replace-fail '"pyright==1.1.403",' "" + + # 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 ]; - pythonRelaxDeps = [ - "mcp" - ]; + pythonRelaxDeps = true; makeWrapperArgs = [ - "--prefix PATH : ${lib.makeBinPath [ pyright ]}" + "--prefix PATH : ${lib.makeBinPath [ pyright fortls ]}" ]; dependencies = with python3Packages; [ anthropic docstring-parser + beautifulsoup4 + cryptography flask jinja2 joblib @@ -52,6 +60,7 @@ python3Packages.buildPythonApplication (finalAttrs: { pathspec psutil pydantic + pystray python-dotenv pyyaml requests @@ -67,12 +76,4 @@ python3Packages.buildPythonApplication (finalAttrs: { }; pythonImportsCheck = [ "serena" ]; - - meta = { - description = "Coding agent toolkit providing semantic code operations for LLMs via MCP"; - homepage = "https://github.com/oraios/serena"; - changelog = "https://github.com/oraios/serena/releases/tag/${finalAttrs.src.tag}"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ jpds ]; - }; })