@@ -28,19 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
2828 inherit hash ;
2929 } ;
3030
31- patches =
32- args . patches or [ ]
33- ++ lib . optionals ( lib . versions . majorMinor finalAttrs . version == "0.9" ) [
34- # Fix index out of bounds reading RPATH (cherry-picked from 0.10-dev)
35- ./patches/0.9-read-dynstr-at-rpath-offset.patch
36- # Fix build on macOS 13 (cherry-picked from 0.10-dev)
37- ./patches/0.9-bump-macos-supported-version.patch
38- ]
39- ++
40- lib . optional ( lib . versions . majorMinor finalAttrs . version == "0.10" )
41- # Backport alignment related panics from zig-master to 0.10.
42- # Upstream issue: https://github.com/ziglang/zig/issues/14559
43- ./patches/0.10-macho-fixes.patch ;
31+ patches = args . patches or [ ] ;
4432
4533 nativeBuildInputs = [
4634 cmake
@@ -69,7 +57,8 @@ stdenv.mkDerivation (finalAttrs: {
6957
7058 outputs = [
7159 "out"
72- ] ++ lib . optional ( lib . versionAtLeast finalAttrs . version "0.10" ) "doc" ;
60+ "doc"
61+ ] ;
7362
7463 # strictDeps breaks zig when clang is being used.
7564 # https://github.com/NixOS/nixpkgs/issues/317055#issuecomment-2148438395
@@ -108,28 +97,20 @@ stdenv.mkDerivation (finalAttrs: {
10897 ''
10998 stage3/bin/zig build langref
11099 ''
111- else if lib . versionAtLeast finalAttrs . version "0.11" then
100+ else
112101 ''
113102 stage3/bin/zig run ../tools/docgen.zig -- ../doc/langref.html.in langref.html --zig $PWD/stage3/bin/zig
114- ''
115- else if lib . versionAtLeast finalAttrs . version "0.10" then
116- ''
117- ./zig2 run ../doc/docgen.zig -- ./zig2 ../doc/langref.html.in langref.html
118- ''
119- else
120- null ;
103+ '' ;
121104
122105 postInstall =
123106 if lib . versionAtLeast finalAttrs . version "0.13" then
124107 ''
125108 install -Dm444 ../zig-out/doc/langref.html -t $doc/share/doc/zig-${ finalAttrs . version } /html
126109 ''
127- else if lib . versionAtLeast finalAttrs . version "0.10" then
110+ else
128111 ''
129112 install -Dm444 langref.html -t $doc/share/doc/zig-${ finalAttrs . version } /html
130- ''
131- else
132- null ;
113+ '' ;
133114
134115 doInstallCheck = true ;
135116 installCheckPhase = ''
0 commit comments