summaryrefslogtreecommitdiff
path: root/custom/redo.patch
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-07-16 19:34:14 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-07-16 19:34:14 +0200
commit4d8c01d386295e1bcdc73dd088e7ca4197c49054 (patch)
tree05585d939b7e14e87f93a525c5e861881365c358 /custom/redo.patch
parenta6328224f3d3f1b05278a0f352432d287bf96eb5 (diff)
parent0c7281ee4a7858b8288cd6c3d60da8b40cb2e698 (diff)
downloadnixos-4d8c01d386295e1bcdc73dd088e7ca4197c49054.tar
nixos-4d8c01d386295e1bcdc73dd088e7ca4197c49054.tar.gz
nixos-4d8c01d386295e1bcdc73dd088e7ca4197c49054.tar.bz2
nixos-4d8c01d386295e1bcdc73dd088e7ca4197c49054.tar.xz
nixos-4d8c01d386295e1bcdc73dd088e7ca4197c49054.zip
Merge branch 'master' of git://git.yggdrasil.li/nixos
Diffstat (limited to 'custom/redo.patch')
-rw-r--r--custom/redo.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/custom/redo.patch b/custom/redo.patch
new file mode 100644
index 00000000..cd3a678e
--- /dev/null
+++ b/custom/redo.patch
@@ -0,0 +1,18 @@
1diff --git a/redo.hs b/redo.hs
2index f0e816a..01c6a2e 100644
3--- a/redo.hs
4+++ b/redo.hs
5@@ -48,7 +48,12 @@ redo target dir = do
6 createDirectoryIfMissing True metaDepsDir
7 writeMD5 target path
8 oldEnv <- getEnvironment
9- let newEnv = toList $ adjust (++ ":.") "PATH" $ insert "REDO_TARGET" target $ fromList oldEnv
10+ redoPath <- lookupEnv "REDO_PATH"
11+ let
12+ redoPath' = case redoPath of
13+ Just p -> p
14+ _ -> "."
15+ newEnv = toList $ adjust (++ (':' : redoPath')) "PATH" $ insert "REDO_TARGET" target $ fromList oldEnv
16 (_, _, _, ph) <- createProcess $ (shell $ cmd path) {env = Just newEnv}
17 exit <- waitForProcess ph
18 case exit of