Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

};

outputs = { self, nixpkgs, home-manager, darwin, ...}@inputs:
outputs = { self, nixpkgs, home-manager, darwin, ...}@inputs:
let
inherit (self) outputs;
system = builtins.currentSystem;
isDarwin = nixpkgs.legacyPackages.${system}.stdenv.isDarwin;

pkgs = import nixpkgs {
inherit system;
overlays = [
Expand All @@ -36,11 +36,11 @@
};

# Helper function to create home configurations with profiles
mkHomeConfig = { username, homeDirectory, gitEmail, profile ? "full" }:
mkHomeConfig = { username, homeDirectory, gitEmail, profile ? "full" }:
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {inherit inputs outputs username homeDirectory gitEmail profile;};
modules = [
modules = [
./home/users/crdant/home.nix
];
};
Expand Down
3 changes: 2 additions & 1 deletion home/modules/ai/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ let
isLinux = pkgs.stdenv.isLinux;
in {
# AI and coding assistant tools
home = {
home = {
packages = with pkgs; [
aider-chat
amp-cli
nur.repos.charmbracelet.crush
unstable.claude-code
claude-memory-extractor
unstable.fabric-ai
gemini-cli
goose-cli
Expand Down
62 changes: 62 additions & 0 deletions pkgs/claude-memory-extractor/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{ lib, stdenv, fetchFromGitHub, nodejs, makeWrapper }:

stdenv.mkDerivation rec {
pname = "claude-memory-extractor";
version = "unstable-2025-01-20";

src = fetchFromGitHub {
owner = "obra";
repo = "claude-memory-extractor";
rev = "384e0302088639cf9a3d40d92cf57e44e25f9044";
hash = "sha256-lvYit/IZwbHhxU3/jlzHL1AMkJ46BGpoYRnSuovDNhs=";
};

nativeBuildInputs = [ nodejs makeWrapper ];

# Using __noChroot due to buildNpmPackage limitations:
# The upstream package-lock.json is stale (renamed from "claude-introspection" to
# "claude-memory" but lock file not regenerated). Even with a corrected lock file,
# buildNpmPackage's prefetch-npm-deps only caches ~50 of 483 dependencies, causing
# ENOTCACHED errors. This appears to be a prefetch-npm-deps limitation with
# lockfileVersion 3 packages.
#
# The source is pinned to a specific commit SHA for reproducibility.
__noChroot = true;

buildPhase = ''
runHook preBuild

export HOME=$TMPDIR
npm ci --prefer-offline --no-audit
npm run build

runHook postBuild
'';

installPhase = ''
runHook preInstall

mkdir -p $out/lib/node_modules/claude-memory-extractor
cp -r . $out/lib/node_modules/claude-memory-extractor

mkdir -p $out/bin
makeWrapper ${nodejs}/bin/node $out/bin/claude-memory \
--add-flags "$out/lib/node_modules/claude-memory-extractor/dist/cli.js"

runHook postInstall
'';

meta = with lib; {
description = "Multi-dimensional memory extraction system for Claude Code conversation logs";
longDescription = ''
A tool that processes Claude Code conversation logs to extract transferable lessons
using multi-dimensional analysis including root cause analysis, psychological driver
identification, and prevention strategies.
'';
homepage = "https://github.com/obra/claude-memory-extractor";
license = licenses.mit;
maintainers = [];
mainProgram = "claude-memory";
platforms = platforms.unix;
};
}
3 changes: 2 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
{ pkgs ? import <nixpkgs> {} } :
{ pkgs ? import <nixpkgs> {} } :
rec {

claude-memory-extractor = pkgs.callPackage ./claude-memory-extractor { };
mbta-mcp-server = pkgs.callPackage ./mbta-mcp-server { };
tunnelmanager = pkgs.callPackage ./tunnelmanager { };

Expand Down