Skip to content

codebase-memory-mcp: 0.11.0 -> 0.12.0 - #574836

Merged
pbsds merged 1 commit into
NixOS:masterfrom
attilaolah:renovate/deusdata-codebase-memory-mcp-0.x
Oct 20, 2026
Merged

pbsds merged 1 commit into
NixOS:masterfrom
attilaolah:renovate/deusdata-codebase-memory-mcp-0.x

Conversation

@attilaolah

@attilaolah attilaolah commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Diff: DeusData/codebase-memory-mcp@v0.11.0...v0.12.0

Major Web UI overhaul:

image

Screenshot above is from the Linux build with onnxruntime loaded via nix store symlinks. Packaging updated quite a bit to replace NuGet onnxruntime dependency with nixpkgs store paths.

Things done

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 16, 2026
@attilaolah

This comment was marked as outdated.

@attilaolah

This comment was marked as outdated.

@attilaolah

Copy link
Copy Markdown
Contributor Author

This update is tough.

On linux, it introduces an NPM dependency on onnxruntime, which I can replace with a symlink to the Nix store onnxruntime to prevent npm trying to download it from NuGet, but it would couple this package with onnxruntime major.minor: an upgrade of onnxruntime to 1.28 would break this build.

I'll try to come up with a better alternative, but for now I'll also test this build to see whether it even works to begin with.

@attilaolah
attilaolah force-pushed the renovate/deusdata-codebase-memory-mcp-0.x branch from 14f05bc to 0e1cfa8 Compare October 16, 2026 15:16
@nixpkgs-ci nixpkgs-ci Bot added the llm-assisted Contributions that include code generation with LLMs label Oct 16, 2026
@attilaolah
attilaolah force-pushed the renovate/deusdata-codebase-memory-mcp-0.x branch 3 times, most recently from d3e4d22 to 244d5ee Compare October 16, 2026 16:28
@attilaolah

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 574836
Commit: 244d5ee48d642cbb2a3af85906754fb9b32a2070


x86_64-linux

✅ 1 package built:
  • codebase-memory-mcp

@attilaolah
attilaolah marked this pull request as ready for review October 16, 2026 18:41
@nixpkgs-ci
nixpkgs-ci Bot requested a review from blackheaven October 16, 2026 18:43
@attilaolah

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 574836
Commit: 244d5ee48d642cbb2a3af85906754fb9b32a2070


aarch64-darwin

✅ 1 package built:
  • codebase-memory-mcp

@attilaolah

Copy link
Copy Markdown
Contributor Author

0.12.1 is out in the meantime, I'll update this PR when I get the chance.

@blackheaven blackheaven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some proposal:

diff --git a/pkgs/by-name/co/codebase-memory-mcp/package.nix b/pkgs/by-name/co/codebase-memory-mcp/package.nix
index 5d4c6a9a1915..a5e8a593cc88 100644
--- a/pkgs/by-name/co/codebase-memory-mcp/package.nix
+++ b/pkgs/by-name/co/codebase-memory-mcp/package.nix
@@ -5,51 +5,20 @@
   fetchNpmDeps,
   nodejs,
   npmHooks,
-  onnxruntime,
-  runCommand,
   stdenv,
   versionCheckHook,
   zlib,
 }:
-let
-  onnxruntimeNodeVersion = "1.27.0";
-  onnxruntimeNodeSupportedPlatform =
-    stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isAarch64);
-in
-# When updating nixpkgs onnxruntime major.minor, update onnxruntime-node and its package-lock integrity hashes together.
-assert lib.assertMsg (
-  lib.versions.majorMinor onnxruntime.version == lib.versions.majorMinor onnxruntimeNodeVersion
-) "codebase-memory-mcp: onnxruntime-node and onnxruntime must share a major.minor version";
 stdenv.mkDerivation (finalAttrs: {
   pname = "codebase-memory-mcp";
   version = "0.12.0";
 
-  src =
-    runCommand "codebase-memory-mcp-${finalAttrs.version}-source"
-      {
-        source = fetchFromGitHub {
-          owner = "DeusData";
-          repo = "codebase-memory-mcp";
-          rev = "v${finalAttrs.version}";
-          hash = "sha256-2pTxcHa4KHpfZnR7IBN0/WKsxqFhRzTXAscIuf2tdwc=";
-        };
-      }
-      ''
-        cp -r "$source" "$out"
-        chmod -R u+w "$out"
-
-        # Keep the Node binding compatible with the ONNX Runtime ABI used by nixpkgs.
-        substituteInPlace "$out/graph-ui/package.json" \
-          --replace-fail '"[email protected]": {' '"onnxruntime-node": { ".": "${onnxruntimeNodeVersion}",'
-        substituteInPlace "$out/graph-ui/package-lock.json" \
-          --replace-fail '"version": "1.24.3"' '"version": "${onnxruntimeNodeVersion}"' \
-          --replace-fail 'onnxruntime-common-1.24.3.tgz' 'onnxruntime-common-${onnxruntimeNodeVersion}.tgz' \
-          --replace-fail 'sha512-GeuPZO6U/LBJXvwdaqHbuUmoXiEdeCjWi/EG7Y1HNnDwJYuk6WUbNXpF6luSUY8yASul3cmUlLGrCCL1ZgVXqA==' 'sha512-3KxL5wIVqa8Ex08jxSzncm9CMgw8CjOFyOQ7SxvG9o0cVLlhTNKXyIQuTbtX4tGPJEf73OER2xrjt4HJSBL4ow==' \
-          --replace-fail 'onnxruntime-node-1.24.3.tgz' 'onnxruntime-node-${onnxruntimeNodeVersion}.tgz' \
-          --replace-fail 'sha512-JH7+czbc8ALA819vlTgcV+Q214/+VjGeBHDjX81+ZCD0PCVCIFGFNtT0V4sXG/1JXypKPgScQcB3ij/hk3YnTg==' 'sha512-QEzGwrvNBgv4uPVdnbHsOGG4G6T96mdlcFI8aAKPjMU8wOPpVocPXb6k3QGkaZagVTv2G9Bnnbo6Z3JdXr1fQw==' \
-          --replace-fail '"global-agent": "^3.0.0"' '"global-agent": "^4.1.3"' \
-          --replace-fail '"onnxruntime-common": "1.24.3"' '"onnxruntime-common": "${onnxruntimeNodeVersion}"'
-      '';
+  src = fetchFromGitHub {
+    owner = "DeusData";
+    repo = "codebase-memory-mcp";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-2pTxcHa4KHpfZnR7IBN0/WKsxqFhRzTXAscIuf2tdwc=";
+  };
 
   patches = [
     ./remove-install-update.diff
@@ -71,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
   npmDeps = fetchNpmDeps {
     inherit (finalAttrs) src;
     sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
-    hash = "sha256-0zfsw4se2jF89PP3a0r5C3sHiZsSgOpmqQ6/HzoZEhM=";
+    hash = "sha256-MKXmiMUofKka1C1jwlm+Mq8X90cTMvipfTC3eX0iv60=";
   };
 
   npmRoot = "graph-ui";
@@ -81,11 +50,11 @@ stdenv.mkDerivation (finalAttrs: {
     npmHooks.npmConfigHook
   ];
 
+  doInstallCheck = true;
   nativeInstallCheckInputs = [ versionCheckHook ];
 
   buildInputs = [
     bash
-    onnxruntime
     zlib
   ];
 
@@ -108,30 +77,10 @@ stdenv.mkDerivation (finalAttrs: {
     "CFLAGS_EXTRA='-DCBM_VERSION=\"${finalAttrs.version}\"'"
   ];
 
-  preBuild = lib.optionalString onnxruntimeNodeSupportedPlatform ''
-    onnxruntimeNodeDir="graph-ui/node_modules/onnxruntime-node/bin/napi-v6/linux/${
-      if stdenv.hostPlatform.isx86_64 then "x64" else "arm64"
-    }"
-
-    # The native binding looks up libonnxruntime.so.1 through its $ORIGIN RUNPATH.
-    # The Nix-built core and providers retain their Nix store RUNPATHs for their
-    # own dependency closures.
-    rm -f "$onnxruntimeNodeDir"/libonnxruntime*.so*
-    for library in ${onnxruntime}/lib/libonnxruntime*.so*; do
-      ln -s "$library" "$onnxruntimeNodeDir/$(basename "$library")"
-    done
-  '';
-
   installPhase = ''
     runHook preInstall
     install -Dm755 build/c/codebase-memory-mcp $out/bin/codebase-memory-mcp
 
-    # Retain the N-API binding at its standard module-relative location. Its
-    # libonnxruntime*.so* entries are Nix-store symlinks created in preBuild.
-    install -d $out/lib/codebase-memory-mcp/node_modules
-    cp -r graph-ui/node_modules/{onnxruntime-common,onnxruntime-node} \
-      $out/lib/codebase-memory-mcp/node_modules/
-
     runHook postInstall
   '';

@attilaolah
attilaolah force-pushed the renovate/deusdata-codebase-memory-mcp-0.x branch 3 times, most recently from 1a3710c to 77f605e Compare October 17, 2026 10:21
@attilaolah

Copy link
Copy Markdown
Contributor Author

With your patches applied, it also builds after a nix-update bump to 0.12.1. I'll do some more testing locally in the afternoon.

@blackheaven blackheaven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, LGTM, thanks a lot!

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 17, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. label Oct 17, 2026
@attilaolah
attilaolah force-pushed the renovate/deusdata-codebase-memory-mcp-0.x branch from 77f605e to e6f9377 Compare October 17, 2026 12:12
Diff: DeusData/codebase-memory-mcp@v0.11.0...v0.12.1

Do not globally interpose mimalloc on Linux: glibc-owned allocations can otherwise reach mi_free during startup and crash the process.

Assisted-by: OpenCode (GPT-5.6 Terra)
Co-authored-by: Gautier DI FOLCO <[email protected]>
@attilaolah
attilaolah force-pushed the renovate/deusdata-codebase-memory-mcp-0.x branch from e6f9377 to af5ba05 Compare October 17, 2026 12:42
@attilaolah

Copy link
Copy Markdown
Contributor Author

Sorry for the post-LGTM pushes,

  • Marked it as broken on musl since it doesn't build as-is
  • Bumped to 0.12.1 since it required no further changes

@attilaolah

Copy link
Copy Markdown
Contributor Author

As a side note, with just two source lines changed, this builds on musl:

readelf -l ./result/bin/codebase-memory-mcp
Elf file type is DYN (Position-Independent Executable file)
Entry point 0x2d9e26       
There are 11 program headers, starting at offset 64                   
                                                                          
Program Headers:                                              
  Type           Offset             VirtAddr           PhysAddr          
                 FileSiz            MemSiz              Flags  Align
  PHDR           0x0000000000000040 0x0000000000000040 0x0000000000000040  
                 0x0000000000000268 0x0000000000000268  R      0x8      
  INTERP         0x00000000000002a8 0x00000000000002a8 0x00000000000002a8
                 0x0000000000000069 0x0000000000000069  R      0x1     
      [Requesting program interpreter: /nix/store/grmhizazcz4jilgb70mmwbzpf5bwhqqp-musl-x86_64-unknown-linux-musl-1.2.6/lib/ld-musl-x86_64.so.1]
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000            
                 0x00000000002cfed0 0x00000000002cfed0  R      0x1000              
  LOAD           0x00000000002d0000 0x00000000002d0000 0x00000000002d0000
                 0x0000000001547261 0x0000000001547261  R E    0x1000  
  LOAD           0x0000000001818000 0x0000000001818000 0x0000000001818000               
                 0x00000000107bf772 0x00000000107bf772  R      0x1000      
  LOAD           0x0000000011fd8320 0x0000000011fd8320 0x0000000011fd8320
                 0x0000000001e716d0 0x0000000001ecbb38  RW     0x1000
  DYNAMIC        0x00000000120c7ee0 0x00000000120c7ee0 0x00000000120c7ee0
                 0x0000000000000240 0x0000000000000240  RW     0x8
  TLS            0x0000000011fd8320 0x0000000011fd8320 0x0000000011fd8320  
                 0x0000000000000030 0x0000000000012049  R      0x10 
  GNU_EH_FRAME   0x0000000011f13b4c 0x0000000011f13b4c 0x0000000011f13b4c    
                 0x000000000001aad4 0x000000000001aad4  R      0x4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     0x10
  GNU_RELRO      0x0000000011fd8320 0x0000000011fd8320 0x0000000011fd8320   
                 0x00000000000f0ce0 0x00000000000f0ce0  R      0x1
                                                                              
 Section to Segment mapping:       
  Segment Sections...                                                        
   00                                                        
   01     .interp
   02     .interp .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt
   03     .init .plt .plt.got .text .fini                                               
   04     .rodata .eh_frame_hdr .eh_frame .gcc_except_table                   
   05     .tdata .init_array .fini_array .data.rel.ro .dynamic .got .data .bss
   06     .dynamic                                                          
   07     .tdata .tbss                                                      
   08     .eh_frame_hdr         
   09                                                                
   10     .tdata .init_array .fini_array .data.rel.ro .dynamic .got            

I'll upstream those changes instead of vendoring patches here.

@pbsbot

pbsbot commented Oct 20, 2026

Copy link
Copy Markdown

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 574836
Commit: af5ba05b472365262e19f9f3e6b938cf53fecfbe


x86_64-linux

✅ 1 package built:
  • codebase-memory-mcp

@pbsds
pbsds added this pull request to the merge queue Oct 20, 2026
Merged via the queue into NixOS:master with commit f201fb6 Oct 20, 2026
29 checks passed
@attilaolah
attilaolah deleted the renovate/deusdata-codebase-memory-mcp-0.x branch October 20, 2026 16:16
attilaolah added a commit to attilaolah/dotfiles that referenced this pull request Oct 20, 2026
PR is now merged so the URL will remain stable.
attilaolah added a commit to attilaolah/dotfiles that referenced this pull request Oct 20, 2026
PR is now merged so the URL will remain stable.
attilaolah added a commit to attilaolah/dotfiles that referenced this pull request Oct 21, 2026
* chore(deps): update flake

* chore(deps): update flake

* feat: install some formatters to the env

* fix(llama-cpp): disable tests that are timing out consistently

* chore(deps): update flake, disable failing llama-cpp tests

* fix: backport patchelf fix

Backport //github.com/NixOS/nixpkgs/pull/575979 to fix CUDA builds.

* chore: update NixOS/nixpkgs#574836 patch

PR is now merged so the URL will remain stable.

* chore: add missing PR comment

* fix: hplip build failure

Backport NixOS/nixpkgs#575319.

* chore(deps): update flake

* chore(deps): update flake, remove applied patches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants