zed-editor: 0.176.1 -> 0.176.2 (#387735)

authored by Gaétan Lepage and committed by GitHub 39935919 40754b99

+25 -20
+25 -20
pkgs/by-name/ze/zed-editor/package.nix
··· 33 33 git, 34 34 apple-sdk_15, 35 35 darwinMinVersionHook, 36 - makeWrapper, 36 + makeBinaryWrapper, 37 37 nodejs, 38 38 libGL, 39 39 libX11, ··· 93 93 ''; 94 94 }; 95 95 }; 96 + 97 + gpu-lib = if withGLES then libglvnd else vulkan-loader; 96 98 in 97 - rustPlatform.buildRustPackage rec { 99 + rustPlatform.buildRustPackage (finalAttrs: { 98 100 pname = "zed-editor"; 99 - version = "0.176.1"; 101 + version = "0.176.2"; 100 102 101 - outputs = [ "out" ] ++ lib.optional buildRemoteServer "remote_server"; 103 + outputs = 104 + [ "out" ] 105 + ++ lib.optionals buildRemoteServer [ 106 + "remote_server" 107 + ]; 102 108 103 109 src = fetchFromGitHub { 104 110 owner = "zed-industries"; 105 111 repo = "zed"; 106 - tag = "v${version}"; 107 - hash = "sha256-Onf3mce327oLbvBPTkJIzJNAf145/ogFK+J6+Asuh9w="; 112 + tag = "v${finalAttrs.version}"; 113 + hash = "sha256-uTq9/skBMz8n2NjGBQKOIOMp/rTDL+azEUzV4jTUJvE="; 108 114 }; 109 115 110 116 patches = [ ··· 125 131 126 132 # Dynamically link WebRTC instead of static 127 133 postPatch = '' 128 - substituteInPlace ../${pname}-${version}-vendor/webrtc-sys-*/build.rs \ 134 + substituteInPlace $cargoDepsCopy/webrtc-sys-*/build.rs \ 129 135 --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" 130 136 ''; 131 137 132 138 useFetchCargoVendor = true; 133 - cargoHash = "sha256-hlX4IMpsEqwYrzDvzFUhh6PVqM9U+4kp/bBYG08BPQA="; 139 + cargoHash = "sha256-b4YTVrz2nOwQnVU42E+LD1YjsUAWN7+fCr2z8IVwH6o="; 134 140 135 141 nativeBuildInputs = 136 142 [ ··· 143 149 rustPlatform.bindgenHook 144 150 cargo-about 145 151 ] 146 - ++ lib.optionals stdenv.hostPlatform.isLinux [ makeWrapper ] 152 + ++ lib.optionals stdenv.hostPlatform.isLinux [ makeBinaryWrapper ] 147 153 ++ lib.optionals stdenv.hostPlatform.isDarwin [ cargo-bundle ]; 148 154 149 155 dontUseCmakeConfigure = true; ··· 179 185 cargoBuildFlags = [ 180 186 "--package=zed" 181 187 "--package=cli" 182 - ] ++ lib.optional buildRemoteServer "--package=remote_server"; 188 + ] ++ lib.optionals buildRemoteServer [ "--package=remote_server" ]; 183 189 184 190 # Required on darwin because we don't have access to the 185 191 # proprietary Metal shader compiler. ··· 189 195 ZSTD_SYS_USE_PKG_CONFIG = true; 190 196 FONTCONFIG_FILE = makeFontsConf { 191 197 fontDirectories = [ 192 - "${src}/assets/fonts/plex-mono" 193 - "${src}/assets/fonts/plex-sans" 198 + "${finalAttrs.src}/assets/fonts/plex-mono" 199 + "${finalAttrs.src}/assets/fonts/plex-sans" 194 200 ]; 195 201 }; 196 202 # Setting this environment variable allows to disable auto-updates 197 203 # https://zed.dev/docs/development/linux#notes-for-packaging-zed 198 204 ZED_UPDATE_EXPLANATION = "Zed has been installed using Nix. Auto-updates have thus been disabled."; 199 205 # Used by `zed --version` 200 - RELEASE_VERSION = version; 206 + RELEASE_VERSION = finalAttrs.version; 201 207 LK_CUSTOM_WEBRTC = livekit-libwebrtc; 202 208 }; 203 209 204 - RUSTFLAGS = if withGLES then "--cfg gles" else ""; 205 - gpu-lib = if withGLES then libglvnd else vulkan-loader; 210 + RUSTFLAGS = lib.optionalString withGLES "--cfg gles"; 206 211 207 212 preBuild = '' 208 213 bash script/generate-licenses ··· 270 275 install -Dm755 $release_target/zed $out/libexec/zed-editor 271 276 install -Dm755 $release_target/cli $out/bin/zeditor 272 277 273 - install -Dm644 ${src}/crates/zed/resources/app-icon@2x.png $out/share/icons/hicolor/1024x1024@2x/apps/zed.png 274 - install -Dm644 ${src}/crates/zed/resources/app-icon.png $out/share/icons/hicolor/512x512/apps/zed.png 278 + install -Dm644 $src/crates/zed/resources/app-icon@2x.png $out/share/icons/hicolor/1024x1024@2x/apps/zed.png 279 + install -Dm644 $src/crates/zed/resources/app-icon.png $out/share/icons/hicolor/512x512/apps/zed.png 275 280 276 281 # extracted from https://github.com/zed-industries/zed/blob/v0.141.2/script/bundle-linux (envsubst) 277 282 # and https://github.com/zed-industries/zed/blob/v0.141.2/script/install.sh (final desktop file name) ··· 310 315 { 311 316 remoteServerVersion = testers.testVersion { 312 317 package = zed-editor.remote_server; 313 - command = "zed-remote-server-stable-${version} version"; 318 + command = "zed-remote-server-stable-${finalAttrs.version} version"; 314 319 }; 315 320 } 316 321 // lib.optionalAttrs stdenv.hostPlatform.isLinux { ··· 321 326 meta = { 322 327 description = "High-performance, multiplayer code editor from the creators of Atom and Tree-sitter"; 323 328 homepage = "https://zed.dev"; 324 - changelog = "https://github.com/zed-industries/zed/releases/tag/v${version}"; 329 + changelog = "https://github.com/zed-industries/zed/releases/tag/v${finalAttrs.version}"; 325 330 license = lib.licenses.gpl3Only; 326 331 maintainers = with lib.maintainers; [ 327 332 GaetanLepage ··· 330 335 mainProgram = "zeditor"; 331 336 platforms = lib.platforms.linux ++ lib.platforms.darwin; 332 337 }; 333 - } 338 + })