()
| 613 | } |
| 614 | |
| 615 | func 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 | |
| 645 | func buildHosts(hosts []nix.Host) (resultPath string, err error) { |
| 646 | if len(hosts) == 0 { |
no outgoing calls
no test coverage detected