lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc: add missing phase hooks

+109 -6
+8
doc/doc-support/package.nix
··· 49 49 ''; 50 50 51 51 buildPhase = '' 52 + runHook preBuild 53 + 52 54 substituteInPlace ./languages-frameworks/python.section.md \ 53 55 --subst-var-by python-interpreter-table "$(<"${pythonInterpreterTable}")" 54 56 ··· 84 86 --section-toc-depth 1 \ 85 87 manual.md \ 86 88 out/index.html 89 + 90 + runHook postBuild 87 91 ''; 88 92 89 93 installPhase = '' 94 + runHook preInstall 95 + 90 96 dest="$out/share/doc/nixpkgs" 91 97 mkdir -p "$(dirname "$dest")" 92 98 mv out "$dest" ··· 97 103 mkdir -p $out/nix-support/ 98 104 echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products 99 105 echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products 106 + 107 + runHook postInstall 100 108 ''; 101 109 102 110 passthru = {
+1 -1
doc/functions/generators.section.md
··· 27 27 } ":"; 28 28 }; 29 29 30 - # the INI file can now be given as plain old nix values 31 30 in 31 + # the INI file can now be given as plain old nix values 32 32 customToINI { 33 33 main = { 34 34 pushinfo = true;
+4
doc/languages-frameworks/agda.section.md
··· 208 208 libraryName = "IAL-1.3"; 209 209 210 210 buildPhase = '' 211 + runHook preBuild 212 + 211 213 patchShebangs find-deps.sh 212 214 make 215 + 216 + runHook postBuild 213 217 ''; 214 218 } 215 219 ```
+4
doc/languages-frameworks/bower.section.md
··· 110 110 ]; 111 111 112 112 buildPhase = '' 113 + runHook preBuild 114 + 113 115 cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . # note 2 114 116 ${pkgs.nodePackages.gulp}/bin/gulp build # note 4 117 + 118 + runHook postBuild 115 119 ''; 116 120 117 121 installPhase = "mv gulpdist $out";
+32
doc/languages-frameworks/emscripten.section.md
··· 47 47 env = (old.env or { }) // { 48 48 NIX_CFLAGS_COMPILE = ""; 49 49 }; 50 + 50 51 configurePhase = '' 51 52 # FIXME: Some tests require writing at $HOME 52 53 HOME=$TMPDIR ··· 57 58 58 59 runHook postConfigure 59 60 ''; 61 + 60 62 dontStrip = true; 61 63 outputs = [ "out" ]; 64 + 62 65 buildPhase = '' 66 + runHook preBuild 67 + 63 68 emmake make 69 + 70 + runHook postBuild 64 71 ''; 72 + 65 73 installPhase = '' 74 + runHook preInstall 75 + 66 76 emmake make install 77 + 78 + runHook postInstall 67 79 ''; 80 + 68 81 checkPhase = '' 82 + runHook preCheck 83 + 69 84 echo "================= testing zlib using node =================" 70 85 71 86 echo "Compiling a custom test" ··· 84 99 echo "it seems to work! very good." 85 100 fi 86 101 echo "================= /testing zlib using node =================" 102 + 103 + runHook postCheck 87 104 ''; 88 105 89 106 postPatch = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isDarwin '' ··· 116 133 openjdk 117 134 json_c 118 135 ]; 136 + 119 137 nativeBuildInputs = [ 120 138 pkg-config 121 139 writableTmpDirAsHomeHook ··· 129 147 }; 130 148 131 149 configurePhase = '' 150 + runHook preConfigure 151 + 132 152 rm -f fastXmlLint.js* 133 153 # a fix for ERROR:root:For asm.js, TOTAL_MEMORY must be a multiple of 16MB, was 234217728 134 154 # https://gitlab.com/odfplugfest/xmlmirror/issues/8 ··· 138 158 sed -e "s/\$(JSONC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(LIBXML20_LDFLAGS)/\$(JSONC_LDFLAGS) \$(LIBXML20_LDFLAGS) \$(ZLIB_LDFLAGS) /g" -i Makefile.emEnv 139 159 # https://gitlab.com/odfplugfest/xmlmirror/issues/11 140 160 sed -e "s/-o fastXmlLint.js/-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -o fastXmlLint.js/g" -i Makefile.emEnv 161 + 162 + runHook postConfigure 141 163 ''; 142 164 143 165 buildPhase = '' 166 + runHook preBuild 167 + 144 168 make -f Makefile.emEnv 169 + 170 + runHook postBuild 145 171 ''; 146 172 147 173 outputs = [ ··· 150 176 ]; 151 177 152 178 installPhase = '' 179 + runHook preInstall 180 + 153 181 mkdir -p $out/share 154 182 mkdir -p $doc/share/${name} 155 183 ··· 163 191 cp *.json $out/share 164 192 cp *.rng $out/share 165 193 cp README.md $doc/share/${name} 194 + runHook postInstall 166 195 ''; 196 + 167 197 checkPhase = '' 198 + runHook preCheck 168 199 200 + runHook postCheck 169 201 ''; 170 202 } 171 203 ```
+4
doc/languages-frameworks/javascript.section.md
··· 651 651 ]; 652 652 653 653 buildPhase = '' 654 + runHook preBuild 655 + 654 656 yarn --offline build 657 + 658 + runHook postBuild 655 659 ''; 656 660 } 657 661 ```
+39 -3
doc/languages-frameworks/maven.section.md
··· 33 33 nativeBuildInputs = [ makeWrapper ]; 34 34 35 35 installPhase = '' 36 + runHook preInstall 37 + 36 38 mkdir -p $out/bin $out/share/jd-cli 37 39 install -Dm644 jd-cli/target/jd-cli.jar $out/share/jd-cli 38 40 39 41 makeWrapper ${jre}/bin/java $out/bin/jd-cli \ 40 42 --add-flags "-jar $out/share/jd-cli/jd-cli.jar" 43 + 44 + runHook postInstall 41 45 ''; 42 46 43 47 meta = { ··· 301 305 buildInputs = [ maven ]; 302 306 src = ./.; # or fetchFromGitHub, cleanSourceWith, etc 303 307 buildPhase = '' 308 + runHook preBuild 309 + 304 310 mvn package -Dmaven.repo.local=$out 311 + 312 + runHook postBuild 305 313 ''; 306 314 307 315 # keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside 308 316 installPhase = '' 317 + runHook preInstall 318 + 309 319 find $out -type f \ 310 320 -name \*.lastUpdated -or \ 311 321 -name resolver-status.properties -or \ 312 322 -name _remote.repositories \ 313 323 -delete 324 + 325 + runHook postInstall 314 326 ''; 315 327 316 328 # don't do any fixup ··· 354 366 maven, 355 367 callPackage, 356 368 }: 357 - # pick a repository derivation, here we will use buildMaven 358 369 let 370 + # pick a repository derivation, here we will use buildMaven 359 371 repository = callPackage ./build-maven-repository.nix { }; 360 372 in 361 373 stdenv.mkDerivation rec { ··· 366 378 buildInputs = [ maven ]; 367 379 368 380 buildPhase = '' 381 + runHook preBuild 382 + 369 383 echo "Using repository ${repository}" 370 384 mvn --offline -Dmaven.repo.local=${repository} package; 385 + 386 + runHook postBuild 371 387 ''; 372 388 373 389 installPhase = '' 374 - install -Dm644 target/${pname}-${version}.jar $out/share/java 390 + runHook preInstall 391 + 392 + install -Dm644 target/${finalAttrs.pname}-${finalAttrs.version}.jar $out/share/java 393 + 394 + runHook postInstall 375 395 ''; 376 396 } 377 397 ``` ··· 430 450 buildInputs = [ maven ]; 431 451 432 452 buildPhase = '' 453 + runHook preBuild 454 + 433 455 echo "Using repository ${repository}" 434 456 mvn --offline -Dmaven.repo.local=${repository} package; 457 + 458 + runHook postBuild 435 459 ''; 436 460 437 461 installPhase = '' 462 + runHook preInstall 463 + 438 464 mkdir -p $out/bin 439 465 440 466 classpath=$(find ${repository} -name "*.jar" -printf ':%h/%f'); ··· 444 470 makeWrapper ${jre}/bin/java $out/bin/${pname} \ 445 471 --add-flags "-classpath $out/share/java/${pname}-${version}.jar:''${classpath#:}" \ 446 472 --add-flags "Main" 473 + 474 + runHook postInstall 447 475 ''; 448 476 } 449 477 ``` ··· 502 530 makeWrapper, 503 531 jre, 504 532 }: 505 - # pick a repository derivation, here we will use buildMaven 506 533 let 534 + # pick a repository derivation, here we will use buildMaven 507 535 repository = callPackage ./build-maven-repository.nix { }; 508 536 in 509 537 stdenv.mkDerivation rec { ··· 515 543 buildInputs = [ maven ]; 516 544 517 545 buildPhase = '' 546 + runHook preBuild 547 + 518 548 echo "Using repository ${repository}" 519 549 mvn --offline -Dmaven.repo.local=${repository} package; 550 + 551 + runHook postBuild 520 552 ''; 521 553 522 554 installPhase = '' 555 + runHook preInstall 556 + 523 557 mkdir -p $out/bin 524 558 525 559 # create a symbolic link for the repository directory ··· 530 564 # this should be the paths from the dependency derivation 531 565 makeWrapper ${jre}/bin/java $out/bin/${pname} \ 532 566 --add-flags "-jar $out/share/java/${pname}-${version}.jar" 567 + 568 + runHook postInstall 533 569 ''; 534 570 } 535 571 ```
+4
doc/languages-frameworks/swift.section.md
··· 106 106 configurePhase = generated.configure; 107 107 108 108 installPhase = '' 109 + runHook preInstall 110 + 109 111 # This is a special function that invokes swiftpm to find the location 110 112 # of the binaries it produced. 111 113 binPath="$(swiftpmBinPath)" 112 114 # Now perform any installation steps. 113 115 mkdir -p $out/bin 114 116 cp $binPath/myproject $out/bin/ 117 + 118 + runHook postInstall 115 119 ''; 116 120 } 117 121 ```
+13 -2
doc/stdenv/stdenv.chapter.md
··· 53 53 stdenv.mkDerivation { 54 54 pname = "fnord"; 55 55 version = "4.5"; 56 + 56 57 # ... 58 + 57 59 buildPhase = '' 60 + runHook preBuild 61 + 58 62 gcc foo.c -o foo 63 + 64 + runHook postBuild 59 65 ''; 60 66 installPhase = '' 67 + runHook preInstall 68 + 61 69 mkdir -p $out/bin 62 70 cp foo $out/bin 71 + 72 + runHook postInstall 63 73 ''; 64 74 } 65 75 ``` ··· 225 235 makeWrapper 226 236 pkg-config 227 237 ]; 238 + 228 239 buildInputs = [ libseccomp ]; 229 240 230 241 postInstall = '' ··· 249 260 util-linux 250 261 qemu 251 262 ]; 252 - checkPhase = ''[elided] ''; 253 - } 263 + checkPhase = ''[elided]''; 264 + }) 254 265 ``` 255 266 256 267 - `makeWrapper` is a setup hook, i.e., a shell script sourced by the generic builder of `stdenv`.