MCPcopy Create free account
hub / github.com/jetify-com/devbox / Eval

Function Eval

internal/nix/eval.go:53–56  ·  view source on GitHub ↗

Eval is raw nix eval. Needs to be parsed. Useful for stuff like nix eval --raw nixpkgs/9ef09e06806e79e32e30d17aee6879d69c011037#fuse3 to determine if a package if a package can be installed in system.

(path string)

Source from the content-addressed store, hash-verified

51// nix eval --raw nixpkgs/9ef09e06806e79e32e30d17aee6879d69c011037#fuse3
52// to determine if a package if a package can be installed in system.
53func Eval(path string) ([]byte, error) {
54 cmd := Command("eval", "--raw", path)
55 return cmd.CombinedOutput(context.TODO())
56}
57
58func IsInsecureAllowed() bool {
59 allowed, _ := strconv.ParseBool(os.Getenv("NIXPKGS_ALLOW_INSECURE"))

Callers 1

Calls 2

CombinedOutputMethod · 0.80
CommandFunction · 0.70

Tested by

no test coverage detected