Commit cab9ca6
authored
patchpkg: use devbox flake instead of local binary (#2378)
Update the patching flake to use the devbox flake (added in 37c36a1)
instead of copying the binary manually.
- It uses the flakeref `"github:jetify-com/devbox/" + build.Version` to
get the same version of Devbox that's currently running.
- For dev builds, it attempts to find the devbox source and use the
local flake instead.
When Devbox needs to patch a package, it generates a flake that calls
`devbox patch` as its builder. Because flake builds are sandboxed, we
need a way of getting devbox into the Nix store.
Previously, we were just copying the currently running devbox executable
into the Nix store and using that. However, Devbox isn't actually a
static binary (we don't build with CGO_ENABLED=0). This causes
`devbox patch` to fail because the flake is isolated from the system's
linker.1 parent 034a486 commit cab9ca6
File tree
3 files changed
+95
-43
lines changed- internal
- build
- shellgen
- tmpl
3 files changed
+95
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
117 | 130 | | |
| 131 | + | |
118 | 132 | | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
122 | | - | |
| 136 | + | |
123 | 137 | | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
127 | | - | |
| 141 | + | |
128 | 142 | | |
129 | 143 | | |
130 | 144 | | |
131 | 145 | | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
135 | | - | |
| 149 | + | |
136 | 150 | | |
137 | 151 | | |
138 | 152 | | |
139 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
140 | 156 | | |
141 | 157 | | |
142 | 158 | | |
| |||
303 | 319 | | |
304 | 320 | | |
305 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 5 | + | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
17 | | - | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | 96 | | |
116 | | - | |
117 | | - | |
| 97 | + | |
| 98 | + | |
118 | 99 | | |
119 | 100 | | |
120 | 101 | | |
| |||
0 commit comments