|
58 | 58 | ); |
59 | 59 | dune-static-overlay = _: super: { |
60 | 60 | ocamlPackages = super.ocaml-ng.ocamlPackages_5_3.overrideScope ( |
61 | | - oself: osuper: { |
| 61 | + _: osuper: { |
62 | 62 | dune_3 = osuper.dune_3.overrideAttrs (a: { |
63 | 63 | src = ./.; |
64 | 64 | preBuild = "ocaml boot/bootstrap.ml --static"; |
|
109 | 109 | in |
110 | 110 | { |
111 | 111 | default = self.packages.${system}.dune; |
| 112 | + |
112 | 113 | dune = pkgs.stdenv.mkDerivation { |
113 | 114 | pname = "dune"; |
114 | 115 | version = "3.x-n/a"; |
|
168 | 169 | ocamlformat = builtins.getAttr ("ocamlformat_" + ocamlformat_version) pkgs; |
169 | 170 |
|
170 | 171 | testNativeBuildInputs = |
171 | | - pkgs: |
| 172 | + p: |
172 | 173 | [ ocamlformat ] |
173 | | - ++ (with pkgs; [ |
| 174 | + ++ (with p; [ |
174 | 175 | nodejs-slim |
175 | 176 | pkg-config |
176 | 177 | opam |
|
186 | 187 | pkgs' = |
187 | 188 | if duneFromScope then |
188 | 189 | pkgs.extend ( |
189 | | - pself: psuper: { |
| 190 | + _: psuper: { |
190 | 191 | ocamlPackages = psuper.ocamlPackages.overrideScope ( |
191 | | - oself: osuper: { |
| 192 | + _: _: { |
192 | 193 | dune_3 = self.packages.${system}.default; |
193 | 194 | } |
194 | 195 | ); |
|
197 | 198 | else |
198 | 199 | pkgs; |
199 | 200 |
|
200 | | - inherit (pkgs') writeScriptBin stdenv; |
201 | | - |
202 | | - duneScript = writeScriptBin "dune" '' |
203 | | - #!${stdenv.shell} |
| 201 | + duneScript = pkgs.writeScriptBin "dune" '' |
| 202 | + #!${pkgs.stdenv.shell} |
204 | 203 | "$DUNE_SOURCE_ROOT"/_boot/dune.exe $@ |
205 | 204 | ''; |
206 | 205 | in |
207 | 206 |
|
208 | | - pkgs'.mkShell { |
| 207 | + pkgs.mkShell { |
209 | 208 | shellHook = '' |
210 | 209 | export DUNE_SOURCE_ROOT=$PWD |
211 | 210 | ''; |
| 211 | + inherit INSIDE_NIX; |
212 | 212 | inherit meta; |
213 | | - nativeBuildInputs = (testNativeBuildInputs pkgs') ++ [ duneScript ]; |
| 213 | + nativeBuildInputs = [ duneScript ] ++ (testNativeBuildInputs pkgs'); |
214 | 214 | inputsFrom = [ |
215 | 215 | pkgs'.ocamlPackages.dune_3 |
216 | 216 | self.devShells.${system}.doc |
217 | 217 | ]; |
218 | 218 | buildInputs = |
219 | | - with pkgs; |
220 | | - [ |
| 219 | + (with pkgs; [ |
221 | 220 | file |
222 | 221 | mercurial |
223 | 222 | unzip |
224 | | - ] |
| 223 | + ]) |
225 | 224 | ++ (with pkgs'.ocamlPackages; [ |
226 | 225 | ctypes |
227 | 226 | cinaps |
|
240 | 239 | uutf |
241 | 240 | ]) |
242 | 241 | ++ (extraBuildInputs pkgs') |
243 | | - ++ lib.optionals stdenv.isLinux [ strace ]; |
244 | | - inherit INSIDE_NIX; |
| 242 | + ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.strace ]; |
245 | 243 | }; |
246 | 244 | in |
247 | 245 | { |
|
303 | 301 | }; |
304 | 302 |
|
305 | 303 | slim-melange = makeDuneDevShell { |
306 | | - extraBuildInputs = pkgs: [ |
307 | | - pkgs.ocamlPackages.melange |
308 | | - ]; |
| 304 | + extraBuildInputs = p: [ p.ocamlPackages.melange ]; |
309 | 305 | meta.description = '' |
310 | 306 | Provides a minimal shell environment built purely from nixpkgs |
311 | 307 | that can run the testsuite (except the coq tests). |
|
357 | 353 | }; |
358 | 354 |
|
359 | 355 | microbench = makeDuneDevShell { |
360 | | - extraBuildInputs = pkgs: [ |
361 | | - pkgs.ocamlPackages.core_bench |
| 356 | + extraBuildInputs = p: [ |
| 357 | + p.ocamlPackages.core_bench |
362 | 358 | ]; |
363 | 359 | meta.description = '' |
364 | 360 | Provides a minimal shell environment that can build the |
|
0 commit comments