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