MCPcopy Create free account
hub / github.com/DBCDK/morph / getNixContext

Function getNixContext

morph.go:615–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

613}
614
615func getNixContext() *nix.NixContext {
616 evalCmd := os.Getenv("MORPH_NIX_EVAL_CMD")
617 buildCmd := os.Getenv("MORPH_NIX_BUILD_CMD")
618 shellCmd := os.Getenv("MORPH_NIX_SHELL_CMD")
619 evalMachines := os.Getenv("MORPH_NIX_EVAL_MACHINES")
620
621 if evalCmd == "" {
622 evalCmd = "nix-instantiate"
623 }
624 if buildCmd == "" {
625 buildCmd = "nix-build"
626 }
627 if shellCmd == "" {
628 shellCmd = "nix-shell"
629 }
630 if evalMachines == "" {
631 evalMachines = filepath.Join(assetRoot, "eval-machines.nix")
632 }
633
634 return &nix.NixContext{
635 EvalCmd: evalCmd,
636 BuildCmd: buildCmd,
637 ShellCmd: shellCmd,
638 EvalMachines: evalMachines,
639 ShowTrace: showTrace,
640 KeepGCRoot: *keepGCRoot,
641 AllowBuildShell: *allowBuildShell,
642 }
643}
644
645func buildHosts(hosts []nix.Host) (resultPath string, err error) {
646 if len(hosts) == 0 {

Callers 3

execEvalFunction · 0.85
getHostsFunction · 0.85
buildHostsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected