Examples (6)
Evaluate Nix flake attributes in the current directory
nix eval .#attributesEvaluate a given Nix expression
nix eval --expr 'your_expression'Evaluate a Nix expression from a specified file
nix eval --file path/to/filePrint the store path of the specified package from nixpkgs
nix eval nixpkgs#pkg --rawEvaluate attributes from a flake directly from GitHub
nix eval github:owner/repo#attributesEvaluate a given lambda function passing the specified package as argument
nix eval nixpkgs#pkg --apply 'lambda_function'made by @shridhargupta | data from tldr-pages