I tried to use rust-flake with https://github.com/nearai/ironclaw/
flake.nix
{
description = "The OpenFang Agent OS";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-flake.url = "github:juspay/rust-flake";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.rust-flake.flakeModules.default
inputs.rust-flake.flakeModules.nixpkgs
];
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
lib,
...
}: {
#rust-project.src = lib.sources.cleanSource ./.;
rust-project.defaults.perCrate.crane.args.buildInputs = with pkgs; [pkg-config openssl];
};
flake = {
};
};
}
With error
# nix flake show
git+file:///home/tilli/git/ironclaw
error:
… while evaluating the attribute 'optionalValue.value'
at /nix/store/zdfpzgjrlxmdiiydiv3vqgvbzbg5fkx0-source/lib/modules.nix:1256:5:
1255|
1256| optionalValue = if isDefined then { value = mergedValue; } else { };
| ^
1257| };
… while evaluating a branch condition
at /nix/store/zdfpzgjrlxmdiiydiv3vqgvbzbg5fkx0-source/lib/modules.nix:1256:21:
1255|
1256| optionalValue = if isDefined then { value = mergedValue; } else { };
| ^
1257| };
… while evaluating definitions from `/nix/store/j5qcw5x2dm0jlffwwymp6yav62l3pdqm-source/modules/transposition.nix':
… while evaluating the option `perSystem.aarch64-darwin.checks':
… while evaluating definitions from `/nix/store/36d5a62qn8wx8kba49lscz3k6163ir7g-source/nix/modules/flake-module.nix':
… while evaluating the option `perSystem.aarch64-darwin.rust-project.crates':
… while evaluating definitions from `/nix/store/36d5a62qn8wx8kba49lscz3k6163ir7g-source/nix/modules/default-crates.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: path 'qsjk72zid41skqzm64chlvhwf6b2cyna-.' is not a valid store path: name '.' is not valid
I believe something is funny about the members field in Cargo.toml
#File: Cargo.toml
[workspace]
members = ["."]
exclude = [
"channels-src/discord",
"channels-src/telegram",
"channels-src/slack",
"channels-src/whatsapp",
"tools-src/github",
"tools-src/gmail",
"tools-src/google-calendar",
"tools-src/google-docs",
"tools-src/google-drive",
"tools-src/google-sheets",
"tools-src/google-slides",
"tools-src/slack",
"tools-src/telegram",
]
[package]
name = "ironclaw"
version = "0.14.0"
edition = "2024"
rust-version = "1.92"
description = "Secure personal AI assistant that protects your data and expands its capabilities on the fly"
authors = ["NEAR AI <support@near.ai>"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/nearai/ironclaw"
repository = "https://github.com/nearai/ironclaw"
[...]
I don't actually know rust and cargo well enough to spot the issue. It usually just works, also with workspaces. Any ideas?
I tried to use rust-flake with https://github.com/nearai/ironclaw/
With error
I believe something is funny about the members field in Cargo.toml
I don't actually know rust and cargo well enough to spot the issue. It usually just works, also with workspaces. Any ideas?