tempo foundry

This commit is contained in:
Miguel Palhas
2026-02-11 14:47:58 +00:00
parent 7e3cae0f4f
commit d673653afb
9 changed files with 335 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "entire";
version = "unstable-2026-02-11";
src = fetchFromGitHub {
owner = "entireio";
repo = "cli";
rev = "4f09f97c2a2d90f5fa28609ff98dbd9ccb988794";
hash = "sha256-b3XjU4f/W0OicWlyvCua5LH8IBBRNs9fggFdwBh1rFY=";
};
vendorHash = "sha256-bzSJfN77v2huchYZwD8ftBRffVLP4OiZqO++KXj3onI=";
subPackages = [ "cmd/entire" ];
# Relax Go version requirement since 1.25.5 is compatible with 1.25.6
postPatch = ''
substituteInPlace go.mod \
--replace-fail "go 1.25.6" "go 1.25.5"
'';
ldflags = [
"-s"
"-w"
];
meta = {
description = "Developer platform that integrates with git workflow to capture AI agent sessions";
homepage = "https://github.com/entireio/cli";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
mainProgram = "entire";
};
}
+135
View File
@@ -0,0 +1,135 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
jq,
git,
coreutils,
gnugrep,
gnused,
gawk,
findutils,
}:
stdenvNoCC.mkDerivation rec {
pname = "ralph-claude-code";
version = "unstable-2026-02-09";
src = fetchFromGitHub {
owner = "frankbria";
repo = "ralph-claude-code";
rev = "605e50f725cd30bcaa53d132939746d37cc08c9d";
hash = "sha256-AS8/z06kZV42O6NrvRdosFEDVdJ1YoYoj/q4OMF2o+0=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
jq
git
coreutils
gnugrep
gnused
gawk
findutils
];
installPhase = ''
runHook preInstall
# Create directory structure
mkdir -p $out/bin
mkdir -p $out/share/ralph
# Install core scripts to share directory
cp ralph_loop.sh $out/share/ralph/
cp ralph_monitor.sh $out/share/ralph/
cp ralph_import.sh $out/share/ralph/
cp migrate_to_ralph_folder.sh $out/share/ralph/
cp ralph_enable.sh $out/share/ralph/
cp ralph_enable_ci.sh $out/share/ralph/
cp setup.sh $out/share/ralph/
# Install templates and lib directories
cp -r templates $out/share/ralph/
cp -r lib $out/share/ralph/
# Create wrapper scripts in bin
# Main ralph command
cat > $out/bin/ralph <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/ralph_loop.sh" "\$@"
EOF
chmod +x $out/bin/ralph
# ralph-monitor
cat > $out/bin/ralph-monitor <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/ralph_monitor.sh" "\$@"
EOF
chmod +x $out/bin/ralph-monitor
# ralph-setup
cat > $out/bin/ralph-setup <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/setup.sh" "\$@"
EOF
chmod +x $out/bin/ralph-setup
# ralph-import
cat > $out/bin/ralph-import <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/ralph_import.sh" "\$@"
EOF
chmod +x $out/bin/ralph-import
# ralph-migrate
cat > $out/bin/ralph-migrate <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/migrate_to_ralph_folder.sh" "\$@"
EOF
chmod +x $out/bin/ralph-migrate
# ralph-enable
cat > $out/bin/ralph-enable <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/ralph_enable.sh" "\$@"
EOF
chmod +x $out/bin/ralph-enable
# ralph-enable-ci
cat > $out/bin/ralph-enable-ci <<EOF
#!/usr/bin/env bash
export RALPH_HOME="$out/share/ralph"
exec "$out/share/ralph/ralph_enable_ci.sh" "\$@"
EOF
chmod +x $out/bin/ralph-enable-ci
# Make all scripts executable
chmod +x $out/share/ralph/*.sh
# Wrap binaries to ensure PATH contains required tools
for prog in $out/bin/*; do
wrapProgram $prog \
--prefix PATH : ${lib.makeBinPath buildInputs}
done
runHook postInstall
'';
meta = {
description = "Autonomous AI development framework for Claude Code";
homepage = "https://github.com/frankbria/ralph-claude-code";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.unix;
mainProgram = "ralph";
};
}
+80
View File
@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
zlib,
libgcc,
}:
let
# Latest nightly as of 2026-02-11
version = "nightly-ff2dc8bdde83aaefb4abaf73b7ac27059edeef25";
# Platform-specific binary selection
sources = {
x86_64-linux = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_linux_amd64.tar.gz";
hash = "sha256-0zpZpHEJ8m0YD0C4VqmFqmdneJHKjATawJO6fu5b6Og=";
};
aarch64-linux = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_linux_arm64.tar.gz";
hash = lib.fakeSha256; # Update if building on aarch64-linux
};
x86_64-darwin = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_darwin_amd64.tar.gz";
hash = lib.fakeSha256; # Update if building on darwin
};
aarch64-darwin = {
url = "https://github.com/tempoxyz/tempo-foundry/releases/download/${version}/foundry_nightly_darwin_arm64.tar.gz";
hash = lib.fakeSha256; # Update if building on darwin
};
};
platform = sources.${stdenv.hostPlatform.system} or (throw "Unsupported platform: ${stdenv.hostPlatform.system}");
in
stdenv.mkDerivation {
pname = "tempo-foundry-bin";
inherit version;
src = fetchurl {
inherit (platform) url hash;
};
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.isLinux [
zlib
libgcc
];
dontBuild = true;
dontConfigure = true;
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
# Install binaries (Tempo fork includes forge, cast, anvil, chisel)
for bin in forge cast anvil chisel; do
if [ -f "$bin" ]; then
install -m755 -D "$bin" "$out/bin/$bin"
fi
done
runHook postInstall
'';
meta = {
description = "Tempo's fork of Foundry - portable and modular toolkit for Ethereum development with Tempo protocol features";
homepage = "https://github.com/tempoxyz/tempo-foundry";
license = with lib.licenses; [ mit asl20 ];
maintainers = [ ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
mainProgram = "forge";
};
}