mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(coding-agent): add Nix flake (#9137)
Add a Nix flake that builds Pi from the checkout on aarch64/x86_64 Linux and macOS. The build is offline: provider model data is hydrated from a pi.dev model catalog revision pinned in nix/model-catalog.json, and the runtime dependency tree comes from packages/coding-agent/install-lock with internal packages built from source. The Nix workflow keeps the catalog pin current on main, builds release tags on all systems, and fast-forwards the stable branch to each release that builds. The release script refreshes the pin before tagging.
This commit is contained in:
parent
4665fafb4d
commit
c71a496ff9
18 changed files with 997 additions and 19 deletions
54
flake.nix
Normal file
54
flake.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
description = "Pi coding agent";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
# nixpkgs unstable no longer supports Intel macOS. Keep using the final
|
||||
# Darwin branch that does so for pi's x86_64-darwin package.
|
||||
nixpkgs-darwin-x64.url = "github:NixOS/nixpkgs/nixpkgs-26.05-darwin";
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-darwin-x64,
|
||||
}:
|
||||
let
|
||||
systems = [
|
||||
"aarch64-darwin"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
nixpkgsFor = system: if system == "x86_64-darwin" then nixpkgs-darwin-x64 else nixpkgs;
|
||||
packageFor =
|
||||
system:
|
||||
let
|
||||
pkgs = import (nixpkgsFor system) { inherit system; };
|
||||
in
|
||||
pkgs.callPackage ./nix/package.nix { source = self; };
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: {
|
||||
default = packageFor system;
|
||||
pi = packageFor system;
|
||||
});
|
||||
|
||||
apps = forAllSystems (system: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.default}/bin/pi";
|
||||
meta.description = "Pi coding agent";
|
||||
};
|
||||
pi = self.apps.${system}.default;
|
||||
});
|
||||
|
||||
overlays.default = final: _previous: {
|
||||
pi = final.callPackage ./nix/package.nix { source = self; };
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue