Describe the bug
Getting an error on the commands attr when trying to configure the devshell via nix
nix develop --show-trace
warning: Git tree '/home/jonathanl/Code/bank-wallet-backend-rs' is dirty
error: cannot coerce a set to a string
at /nix/store/4ri9hysy5z82hj602whjrswrwfxsig4n-source/flake.nix:118:11:
117| ];
118| commands = with commands;
| ^
119| [
… while evaluating the attribute 'commands' of the derivation 'nix-shell'
at /nix/store/m5jxlii8jz3mrr8fsbhb1zq310zvd10l-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
My devshell configuration:
devShells.default = pkgs.mkShell {
devshell.name = "holdings-rs-shell";
devshell.startup.pre-commit = self.checks.${system}.pre-commit-check.shellHook;
devshell.packages = with pkgs; [
# Rust build inputs
pkg-config
openssl
# LSP's
rust-analyzer
rnix-lsp
# Tools
rust-toolchain
bacon
alejandra
nix-linter
# Cargo plugins
cargo-audit
cargo-udeps
cargo-bloat
cargo-expand
# CLI tools
sqlx-cli
bunyan-rs
# Faster linkers
(
if (lib.strings.hasInfix "darwin" system)
then zld
else if (lib.strings.hasInfix "aarch64" system)
then lld
else mold
)
];
commands = with commands;
[
{
help = "Format rust and nix files";
name = "format";
package = format;
category = "hygene";
}
{
help = "Generate typescript types for the frontend";
name = "gen-types";
package = gen-types;
category = "code-generation";
}
{
help = "Generate sql query indices for sqlx offline mode";
name = "gen-sql";
package = gen-sql;
category = "code-generation";
}
{
help = "Run tests with specific logging configuration";
name = "test-logs";
package = test-logs;
category = "testing";
}
{
help = "Run clippy with specific warning flags enabled";
name = "clippy-full";
package = clippy-full;
category = "hygene";
}
];
};
Expected behavior
I would expect to be able to configure commands the same way as specified in the module example
Describe the bug Getting an error on the
commands
attr when trying to configure the devshell via nixMy devshell configuration:
Expected behavior
I would expect to be able to configure commands the same way as specified in the module example
System information