File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 4040 ] ;
4141 } ) ;
4242 runtimeDeps = [
43- pkgs . iproute2
43+ ( if pkgs . stdenv . isLinux then pkgs . iproute2 else pkgs . iproute2mac )
4444 pkgs . nix
4545 pkgs . openssh
4646 pkgs . vde2
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import Network.Socket.Free (getFreePort)
1414import Options (VmName (.. ))
1515import State
1616import StdLib
17+ import System.Info (os )
1718import System.Directory (createDirectoryIfMissing , listDirectory )
1819import System.Environment (getEnvironment )
1920import System.FilePath (takeDirectory )
@@ -52,6 +53,9 @@ listVmsImpl ctx = do
5253 Left err -> impossible ctx $ cs err
5354 Right (parsed :: [Text ]) -> pure $ map VmName parsed
5455
56+ darwinBuilderArgs :: [Text ]
57+ darwinBuilderArgs = if os == " darwin" then [" --builder" , " /etc/nix/builder_ed25519" ] else [" " ]
58+
5559buildVmScriptImpl :: Context -> Maybe Handle -> VmName -> IPv4 -> IO (FilePath , Port )
5660buildVmScriptImpl ctx handle vmName ip = do
5761 port <- getFreePort
@@ -84,6 +88,7 @@ buildVmScriptImpl ctx handle vmName ip = do
8488 " --no-link" ,
8589 drvPath <> " ^*"
8690 ]
91+ <> darwinBuilderArgs
8792 )
8893 & Cradle. setWorkingDir (workingDir ctx)
8994 & maybe id addStderrHandle handle
You can’t perform that action at this time.
0 commit comments