mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
## Summary - Add rust-overlay input to provide newer Rust versions (rama crates require rustc 1.91.0+) - Add devShells output with complete development environment - Add missing git dependency hashes to codex-rs/default.nix ## Changes **flake.nix:** - Added `rust-overlay` input to get newer Rust toolchains - Updated `packages` output to use `rust-bin.stable.latest.minimal` for builds - Added `devShells` output with: - Rust with `rust-src` and `rust-analyzer` extensions for IDE support - Required build dependencies: `pkg-config`, `openssl`, `cmake`, `libclang` - Environment variables: `PKG_CONFIG_PATH`, `LIBCLANG_PATH` **codex-rs/default.nix:** - Added missing `outputHashes` for git dependencies: - `nucleo-0.5.0`, `nucleo-matcher-0.3.1` - `runfiles-0.1.0` - `tokio-tungstenite-0.28.0`, `tungstenite-0.28.0` ## Test Plan - [x] `nix develop` enters shell successfully - [x] `nix develop -c rustc --version` shows 1.93.0 - [x] `nix develop -c cargo build` completes successfully
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{
|
|
description = "Development Nix flake for OpenAI Codex CLI";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { nixpkgs, flake-utils, rust-overlay, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
pkgsWithRust = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
monorepo-deps = with pkgs; [
|
|
# for precommit hook
|
|
pnpm
|
|
husky
|
|
];
|
|
code-rs = import ./code-rs {
|
|
pkgs = pkgsWithRust;
|
|
inherit monorepo-deps;
|
|
};
|
|
in
|
|
{
|
|
packages = {
|
|
code-rs = code-rs.package;
|
|
default = code-rs.package;
|
|
};
|
|
|
|
devShells = {
|
|
code-rs = code-rs.devShell;
|
|
default = code-rs.devShell;
|
|
};
|
|
|
|
apps = {
|
|
code-rs = code-rs.app;
|
|
default = code-rs.app;
|
|
};
|
|
}
|
|
);
|
|
}
|