Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
argonix
Commits
06f194b8
Commit
06f194b8
authored
Mar 06, 2019
by
Valentin Reis
Browse files
no linking, copy rather.
parent
a0d45b5e
Pipeline
#5867
passed with stage
in 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Argonix.hs
View file @
06f194b8
...
...
@@ -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
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment