Add pi
This commit is contained in:
parent
23d22dd2ce
commit
af35f0bc99
6 changed files with 3606 additions and 0 deletions
|
|
@ -103,6 +103,7 @@
|
||||||
overlay-local = final: prev: {
|
overlay-local = final: prev: {
|
||||||
codex = prev.callPackage ./pkgs/codex/package.nix { };
|
codex = prev.callPackage ./pkgs/codex/package.nix { };
|
||||||
opencode = prev.callPackage ./pkgs/opencode/package.nix { };
|
opencode = prev.callPackage ./pkgs/opencode/package.nix { };
|
||||||
|
pi-coding-agent = prev.callPackage ./pkgs/pi-coding-agent/package.nix { };
|
||||||
beads =
|
beads =
|
||||||
let
|
let
|
||||||
bdBase =
|
bdBase =
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,7 @@
|
||||||
pkgs.beads
|
pkgs.beads
|
||||||
gh
|
gh
|
||||||
pkgs.opencode
|
pkgs.opencode
|
||||||
|
pkgs.pi-coding-agent
|
||||||
python3
|
python3
|
||||||
clang
|
clang
|
||||||
clangStdenv
|
clangStdenv
|
||||||
|
|
@ -396,6 +397,7 @@
|
||||||
bitwarden-cli
|
bitwarden-cli
|
||||||
itch
|
itch
|
||||||
dtach
|
dtach
|
||||||
|
whois
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
|
|
|
||||||
3532
pkgs/pi-coding-agent/package-lock.json
generated
Normal file
3532
pkgs/pi-coding-agent/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
8
pkgs/pi-coding-agent/package.json
Normal file
8
pkgs/pi-coding-agent/package.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "pi-coding-agent-package",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@mariozechner/pi-coding-agent": "0.58.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
34
pkgs/pi-coding-agent/package.nix
Normal file
34
pkgs/pi-coding-agent/package.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildNpmPackage,
|
||||||
|
nodejs,
|
||||||
|
}:
|
||||||
|
buildNpmPackage (finalAttrs: {
|
||||||
|
pname = "pi-coding-agent";
|
||||||
|
version = "0.58.4";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
npmDepsHash = "sha256-NckjndfyChAw0tvp+qMO2henbV00nY1DmckJxGqFHog=";
|
||||||
|
|
||||||
|
inherit nodejs;
|
||||||
|
dontNpmBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin $out/lib/node_modules/pi-coding-agent-package
|
||||||
|
|
||||||
|
cp -R node_modules package.json package-lock.json $out/lib/node_modules/pi-coding-agent-package/
|
||||||
|
ln -s $out/lib/node_modules/pi-coding-agent-package/node_modules/.bin/pi $out/bin/pi
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Coding agent CLI from the PI ecosystem";
|
||||||
|
homepage = "https://www.npmjs.com/package/@mariozechner/pi-coding-agent";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "pi";
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
|
})
|
||||||
29
pkgs/pi-coding-agent/update-version.sh
Executable file
29
pkgs/pi-coding-agent/update-version.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [[ $# -ne 1 ]]; then
|
||||||
|
echo "Usage: $0 <version>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
new_version=$1
|
||||||
|
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
repo_root=$(cd -- "$script_dir/../.." && pwd)
|
||||||
|
package_nix="$script_dir/package.nix"
|
||||||
|
|
||||||
|
echo "Updating package.nix to version $new_version and resetting npmDepsHash..."
|
||||||
|
sed -i -E "s|^ version = \".*\";$| version = \"$new_version\";|" "$package_nix"
|
||||||
|
sed -i -E 's|^ npmDepsHash = .*;$| npmDepsHash = lib.fakeHash;|' "$package_nix"
|
||||||
|
|
||||||
|
echo "Refreshing package.json and package-lock.json..."
|
||||||
|
(
|
||||||
|
cd "$script_dir"
|
||||||
|
npm install --package-lock-only --save-exact "@mariozechner/pi-coding-agent@${new_version}"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Running nix build to discover the new npmDepsHash..."
|
||||||
|
(
|
||||||
|
cd "$repo_root"
|
||||||
|
nix build .#nixosConfigurations.liminal.pkgs.pi-coding-agent
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue