Commit 06f194b8 authored by Valentin Reis's avatar Valentin Reis

no linking, copy rather.

parent a0d45b5e
Pipeline #5867 passed with stage
in 20 seconds
......@@ -329,7 +329,7 @@ readProcessVerbose verbosity name arguments envVars = do
Just r -> return r
Nothing -> die "readProcess returned more than one line."
setupSystem :: Text -> ArgsCommon -> IO [(Text, Text)]
setupSystem :: Text -> ArgsCommon -> IO ([(Text, Text)],Text)
setupSystem target sa = do
sVerbose "sudo rm -rf result" >>= \case
......@@ -348,7 +348,6 @@ setupSystem target sa = do
["-d", "/tmp/tmpdir-XXXX"]
[]
sVerbose $ "chmod 777 " <> varTMPDIR
sVerbose $ "ln -s " <> varTMPDIR <> " " <> "./nixtmpdir"
passVars <- getVars ["PATH", "NIX_PATH", "NIX_SSL_CERT_FILE"]
......@@ -358,7 +357,7 @@ setupSystem target sa = do
when (isTarget target) $ setupNodeOs envVars
return envVars
return (envVars,varXDG_CACHE_HOME)
where
getVars :: [Text] -> IO [(Text, Text)]
getVars vars = catMaybes <$> mapM maybeGet vars
......@@ -409,7 +408,7 @@ nixArguments target ArgsCommon {..} =
wrap :: NixCommand -> Text -> ArgsCommon -> IO ()
wrap nixCommand target sa@ArgsCommon {..} = do
when (verbosity == Verbose) $ print sa
envVars <- setupSystem target sa
(envVars,tmpXDGHOME) <- setupSystem target sa
putText $ nixc <> " " <> T.unwords arglist
case nixCommand of
NixShell -> executeFile (toS nixc) True (fmap toS arglist) Nothing
......@@ -419,6 +418,7 @@ wrap nixCommand target sa@ArgsCommon {..} = do
(P.proc (toS nixc) $ fmap toS arglist)
)
<> P.runProcess_ (P.proc "cp" ["-r", "/tmp/papa", "./result"])
<> P.runProcess_ (P.proc "cp" ["-r", toS tmpXDGHOME, "./nixtmpdir"])
where
nixc = toCommand nixCommand
arglist =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment