This commit is contained in:
1 parent
02373fd597
commit
232d56f2dc
2 files changed
+48
No files matched your search
@@ -3,6 +3,7 @@
|
|||||||
Minimal Rust coding agent. Uses your existing subscriptions, no API keys.
|
Minimal Rust coding agent. Uses your existing subscriptions, no API keys.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
nix run github:johannes/hx # Nix: run directly (flake; also `nix profile install`)
|
||||||
cargo build --release
|
cargo build --release
|
||||||
hx login claude # Claude Pro/Max
|
hx login claude # Claude Pro/Max
|
||||||
hx login codex # ChatGPT Plus/Pro
|
hx login codex # ChatGPT Plus/Pro
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
description = "hx: minimal Rust coding agent";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ self, nixpkgs }:
|
||||||
|
let
|
||||||
|
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
forAll = f: nixpkgs.lib.genAttrs systems (s: f nixpkgs.legacyPackages.${s});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forAll (pkgs: rec {
|
||||||
|
hx = pkgs.rustPlatform.buildRustPackage {
|
||||||
|
pname = "hx";
|
||||||
|
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).workspace.package.version;
|
||||||
|
src = pkgs.lib.cleanSource ./.;
|
||||||
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
cargoBuildFlags = [ "-p" "hx-cli" ];
|
||||||
|
# ponytail: tests skipped (need git/network); enable when hermetic.
|
||||||
|
doCheck = false;
|
||||||
|
# rustls may build aws-lc-sys (cmake) depending on feature set.
|
||||||
|
nativeBuildInputs = [ pkgs.cmake pkgs.perl ];
|
||||||
|
dontUseCmakeConfigure = true;
|
||||||
|
meta = {
|
||||||
|
description = "Minimal Rust coding agent using existing subscriptions";
|
||||||
|
license = pkgs.lib.licenses.unlicense;
|
||||||
|
mainProgram = "hx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = hx;
|
||||||
|
});
|
||||||
|
|
||||||
|
apps = forAll (pkgs: rec {
|
||||||
|
hx = { type = "app"; program = "${self.packages.${pkgs.system}.hx}/bin/hx"; };
|
||||||
|
default = hx;
|
||||||
|
});
|
||||||
|
|
||||||
|
overlays.default = _: prev: { hx = self.packages.${prev.system}.hx; };
|
||||||
|
|
||||||
|
devShells = forAll (pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [ cargo rustc clippy rustfmt rust-analyzer git ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user