|
119 | 119 | name = "emacs-webrender-" + version;
|
120 | 120 | src = emacsWebrenderSource;
|
121 | 121 | emacsVersion = "30.0.50";
|
122 |
| - version = emacsVersion + "-" + builtins.substring 0 7 emacsWebrenderSource.rev; |
| 122 | + version = emacsVersion + "-" |
| 123 | + + builtins.substring 0 7 emacsWebrenderSource.rev; |
123 | 124 | # https://github.com/NixOS/nixpkgs/blob/22.11/pkgs/applications/networking/browsers/firefox/common.nix#L574
|
124 | 125 | # Firefox use this.
|
125 | 126 | # guix has cargo-utils to fix checksum, won't be useful on nix though
|
|
154 | 155 | "--with-compress-install"
|
155 | 156 | "--with-zlib"
|
156 | 157 | "--with-dumping=pdumper"
|
157 |
| - ] ++ lib.optionals withWebrender [ "--with-webrender" ] |
| 158 | + ] ++ lib.optionals withWebrender [ |
| 159 | + "--with-webrender" |
| 160 | + "--enable-webrender-x11" |
| 161 | + ] |
158 | 162 |
|
159 | 163 | ++ lib.optionals (stdenv.isDarwin && withWebrender)
|
160 | 164 | [ "--disable-webrender-self-contained" ]
|
|
174 | 178 | custom-llvmPackages.libclang
|
175 | 179 | final.rust-bin.nightly."${locked-date}".default
|
176 | 180 | git
|
177 |
| - ] ++ lib.optionals withWebrender |
178 |
| - ([python3] ++ rpathLibs) |
| 181 | + ] ++ lib.optionals withWebrender ([ python3 ] ++ rpathLibs) |
179 | 182 | ++ lib.optionals stdenv.isDarwin
|
180 | 183 | (with darwin.apple_sdk.frameworks;
|
181 | 184 | with darwin;
|
|
198 | 201 | dontPatchShebangs =
|
199 | 202 | true; # straight_watch_callback.py: unsupported interpreter directive "#!/usr/bin/env -S python3 -u"
|
200 | 203 |
|
201 |
| - postFixup = |
202 |
| - (old.postFixup or "") |
203 |
| - + ( |
204 |
| - if withWebrender |
205 |
| - then |
206 |
| - lib.concatStringsSep "\n" [ |
207 |
| - (lib.optionalString stdenv.isLinux '' |
208 |
| - patchelf --set-rpath \ |
209 |
| - "$(patchelf --print-rpath "$out/bin/emacs-$emacsVersion"):${lib.makeLibraryPath rpathLibs}" \ |
210 |
| - "$out/bin/emacs-$emacsVersion" |
211 |
| - patchelf --add-needed "libfontconfig.so" "$out/bin/emacs-$emacsVersion" |
212 |
| - '') |
213 |
| - ] |
214 |
| - else "" |
215 |
| - ); |
| 204 | + postFixup = (old.postFixup or "") + (if withWebrender then |
| 205 | + lib.concatStringsSep "\n" [ |
| 206 | + (lib.optionalString stdenv.isLinux '' |
| 207 | + patchelf --set-rpath \ |
| 208 | + "$(patchelf --print-rpath "$out/bin/emacs-$emacsVersion"):${ |
| 209 | + lib.makeLibraryPath rpathLibs |
| 210 | + }" \ |
| 211 | + "$out/bin/emacs-$emacsVersion" |
| 212 | + patchelf --add-needed "libfontconfig.so" "$out/bin/emacs-$emacsVersion" |
| 213 | + '') |
| 214 | + ] |
| 215 | + else |
| 216 | + ""); |
216 | 217 | });
|
217 | 218 | };
|
218 | 219 | };
|
|
0 commit comments