Commit a0d45b5e authored by Valentin Reis's avatar Valentin Reis

argonix tmpdir uses mktemp

parent 0610e1b6
Pipeline #5860 passed with stage
in 19 seconds
......@@ -26,7 +26,6 @@ import qualified Data.Text as T
, unwords
)
import System.Console.ANSI
import qualified System.Directory as SD
import System.Console.ANSI.Types ( Color )
import System.Posix.Process
import qualified System.Process.Typed as P
......@@ -344,7 +343,12 @@ setupSystem target sa = do
varXDG_CACHE_HOME <- rpVerbose "mktemp"
["-d", "/tmp/deletable-nix-cache-XXXX"]
[]
varTMPDIR <- createAndSetTMPDIR "nixtmpdir"
varTMPDIR <- rpVerbose "mktemp"
["-d", "/tmp/tmpdir-XXXX"]
[]
sVerbose $ "chmod 777 " <> varTMPDIR
sVerbose $ "ln -s " <> varTMPDIR <> " " <> "./nixtmpdir"
passVars <- getVars ["PATH", "NIX_PATH", "NIX_SSL_CERT_FILE"]
......@@ -393,14 +397,6 @@ setupSystem target sa = do
sVerbose = shellVerbose $ verbosity sa
rpVerbose = readProcessVerbose $ verbosity sa
createAndSetTMPDIR :: Text -> IO Text
createAndSetTMPDIR name = do
let p = "/tmp/" <> name
SD.createDirectoryIfMissing True (toS p)
sVerbose $ "chmod 777 " <> p
sVerbose $ "ln -s " <> p <> " " <> name
return $ toS p
nixArguments :: Text -> ArgsCommon -> [Text]
nixArguments target ArgsCommon {..} =
[argopkgs, "-A", target]
......
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