doc: Fix missing pre/post hooks everywhere (#318737)

authored by Niklas Hambüchen and committed by GitHub 4684fd6b 1a022584

+48 -5
+1 -1
doc/build-helpers/special/checkpoint-build.section.md
··· 37 37 helloCheckpoint = prepareCheckpointBuild pkgs.hello; 38 38 changedHello = pkgs.hello.overrideAttrs (_: { 39 39 doCheck = false; 40 - patchPhase = '' 40 + postPatch = '' 41 41 sed -i 's/Hello, world!/Hello, Nix!/g' src/hello.c 42 42 ''; 43 43 });
+4
doc/doc-support/lib-function-docs.nix
··· 102 102 ]; 103 103 104 104 installPhase = '' 105 + runHook preInstall 106 + 105 107 cd .. 106 108 107 109 export NIX_STATE_DIR=$(mktemp -d) ··· 143 145 ) libsets} 144 146 145 147 echo '```' >> "$out/index.md" 148 + 149 + runHook postInstall 146 150 ''; 147 151 }
+7 -1
doc/languages-frameworks/bower.section.md
··· 118 118 runHook postBuild 119 119 ''; 120 120 121 - installPhase = "mv gulpdist $out"; 121 + installPhase = '' 122 + runHook preInstall 123 + 124 + mv gulpdist $out 125 + 126 + runHook postInstall 127 + ''; 122 128 } 123 129 ``` 124 130
+1
doc/languages-frameworks/emscripten.section.md
··· 192 192 cp *.json $out/share 193 193 cp *.rng $out/share 194 194 cp README.md $doc/share/${name} 195 + 195 196 runHook postInstall 196 197 ''; 197 198
+4
doc/languages-frameworks/java.section.md
··· 69 69 nativeBuildInputs = [ makeWrapper ]; 70 70 71 71 installPhase = '' 72 + runHook preInstall 73 + 72 74 mkdir -p $out/bin 73 75 makeWrapper ${jre}/bin/java $out/bin/foo \ 74 76 --add-flags "-cp $out/share/java/foo.jar org.foo.Main" 77 + 78 + runHook postInstall 75 79 ''; 76 80 } 77 81 ```
+8
doc/languages-frameworks/javascript.section.md
··· 690 690 ```nix 691 691 { 692 692 configurePhase = '' 693 + runHook preConfigure 694 + 693 695 ln -s $node_modules node_modules 696 + 697 + runHook postConfigure 694 698 ''; 695 699 } 696 700 ``` ··· 700 704 ```nix 701 705 { 702 706 configurePhase = '' 707 + runHook preConfigure 708 + 703 709 cp -r $node_modules node_modules 704 710 chmod +w node_modules 711 + 712 + runHook postConfigure 705 713 ''; 706 714 } 707 715 ```
+4
doc/languages-frameworks/lisp.section.md
··· 59 59 ```nix 60 60 { 61 61 buildPhase = '' 62 + runHook preBuild 63 + 62 64 ${sbcl'}/bin/sbcl --load my-build-file.lisp 65 + 66 + runHook postBuild 63 67 ''; 64 68 } 65 69 ```
+14 -2
doc/languages-frameworks/swift.section.md
··· 103 103 104 104 # The helper provides a configure snippet that will prepare all dependencies 105 105 # in the correct place, where SwiftPM expects them. 106 - configurePhase = generated.configure; 106 + configurePhase = '' 107 + runHook preConfigure 108 + 109 + ${generated.configure} 110 + 111 + runHook postConfigure 112 + ''; 107 113 108 114 installPhase = '' 109 115 runHook preInstall ··· 168 174 169 175 ```nix 170 176 { 171 - configurePhase = generated.configure ++ '' 177 + configurePhase = '' 178 + runHook preConfigure 179 + 180 + ${generated.configure} 181 + 172 182 # Replace the dependency symlink with a writable copy. 173 183 swiftpmMakeMutable swift-crypto 174 184 # Now apply a patch. 175 185 patch -p1 -d .build/checkouts/swift-crypto -i ${./some-fix.patch} 186 + 187 + runHook postConfigure 176 188 ''; 177 189 } 178 190 ```
+4
doc/packages/weechat.section.md
··· 113 113 "bar.lua" 114 114 ]; 115 115 installPhase = '' 116 + runHook preInstall 117 + 116 118 mkdir $out/share 117 119 cp foo.py $out/share 118 120 cp bar.lua $out/share 121 + 122 + runHook postInstall 119 123 ''; 120 124 } 121 125 ```
+1 -1
doc/stdenv/stdenv.chapter.md
··· 261 261 util-linux 262 262 qemu 263 263 ]; 264 - checkPhase = ''[elided]''; 264 + # `checkPhase` elided 265 265 }) 266 266 ``` 267 267