Commit 38b8144
authored
patchpkg:
When running inside a Nix derivation the PATH is completely empty, so
functions like `exec.Command("bash")` don't work. To make dealing with
this easier, add a helper function that looks for an environment
variable named after the command and returns `$cmd/bin/cmd` (e.g.,
`bash` becomes `$bash/bin/bash`). This will automatically find
build-time dependencies that are added as attributes to the derivation.lookPath helper to find nix binaries (#2247)1 parent 0fdfc67 commit 38b8144
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
155 | 173 | | |
156 | 174 | | |
0 commit comments