From bfb17c71db9cd48bb04d2f873bc69601e3ea368c Mon Sep 17 00:00:00 2001 From: SpidFightFR Date: Mon, 20 May 2024 19:43:38 +0200 Subject: [PATCH] New package: zed-0.139.3 --- .../0001-tweak-default-conf-for-privacy.patch | 89 +++++++++++++++++++ srcpkgs/zed/template | 27 ++++++ 2 files changed, 116 insertions(+) create mode 100644 srcpkgs/zed/patches/0001-tweak-default-conf-for-privacy.patch create mode 100644 srcpkgs/zed/template diff --git a/srcpkgs/zed/patches/0001-tweak-default-conf-for-privacy.patch b/srcpkgs/zed/patches/0001-tweak-default-conf-for-privacy.patch new file mode 100644 index 00000000000000..54e214e7de5f5c --- /dev/null +++ b/srcpkgs/zed/patches/0001-tweak-default-conf-for-privacy.patch @@ -0,0 +1,89 @@ +diff --git a/assets/settings/default.json b/assets/settings/default.json +index 573383f..e755924 100644 +--- a/assets/settings/default.json ++++ b/assets/settings/default.json +@@ -25,8 +25,10 @@ + "base_keymap": "VSCode", + // Features that can be globally enabled or disabled + "features": { ++ //Disables copilot by default ++ "copilot": false, + // Which inline completion provider to use. +- "inline_completion_provider": "copilot" ++ "inline_completion_provider": "none" + }, + // The name of a font to use for rendering text in the editor + "buffer_font_family": "Zed Mono", +@@ -329,7 +331,7 @@ + // Version of this setting. + "version": "1", + // Whether the assistant is enabled. +- "enabled": true, ++ "enabled": false, + // Whether to show the assistant panel button in the status bar. + "button": true, + // Where to dock the assistant panel. Can be 'left', 'right' or 'bottom'. +@@ -449,13 +451,13 @@ + // Control what info is collected by Zed. + "telemetry": { + // Send debug info like crash reports. +- "diagnostics": true, ++ "diagnostics": false, + // Send anonymized usage data like what languages you're using Zed with. +- "metrics": true ++ "metrics": false + }, + // Automatically update Zed. This setting may be ignored on Linux if + // installed through a package manager. +- "auto_update": true, ++ "auto_update": false, + // Diagnostics configuration. + "diagnostics": { + // Whether to show warnings or not by default. +@@ -504,7 +506,7 @@ + // May take 2 values: + // 1. hour12 + // 2. hour24 +- "hour_format": "hour12" ++ "hour_format": "hour24" + }, + // Settings specific to the terminal + "terminal": { +diff --git a/assets/settings/initial_user_settings.json b/assets/settings/initial_user_settings.json +index 75d4a02..826ad7a 100644 +--- a/assets/settings/initial_user_settings.json ++++ b/assets/settings/initial_user_settings.json +@@ -7,6 +7,33 @@ + // custom settings, run the `open default settings` command + // from the command palette or from `Zed` application menu. + { ++ //The default font size for text in the UI + "ui_font_size": 16, ++ //The default font size for text in the editor + "buffer_font_size": 16 ++ ++ // The following settings have been changed from the upstream defaults to ++ // improve security and privacy. Here are the upstream defaults, you can ++ // uncomment them if you like. ++ // ++ // "features": { ++ // // Enable copilot (provided by an online service). ++ // "copilot": true, ++ // "inline_completion_provider": "copilot" ++ // }, ++ // "assistant": { ++ // "version": "1", ++ // // Enable the assistant (provided by an online service). ++ // "enabled": true ++ // }, ++ // "telemetry": { ++ // // Send debug info like crash reports to Zed Industries. ++ // "diagnostics": true, ++ // // Send anonymized usage data like what languages you're using Zed with ++ // // to Zed Industries. ++ // "metrics": true ++ // }, ++ // "journal": { ++ // "hour_format": "hour12" ++ // } + } diff --git a/srcpkgs/zed/template b/srcpkgs/zed/template new file mode 100644 index 00000000000000..feecbb2fdb05df --- /dev/null +++ b/srcpkgs/zed/template @@ -0,0 +1,27 @@ +# Template file for 'zed' +pkgname=zed +version=0.139.3 +revision=1 +archs="x86_64* aarch64*" +build_style=cargo +make_install_args="--path crates/zed" +hostmakedepends="pkg-config protobuf gettext" +makedepends="alsa-lib-devel fontconfig-devel libxcb-devel libxkbcommon-devel +libzstd-devel wayland-devel vulkan-loader openssl-devel libgit2-devel" +depends="git" +checkdepends="noto-fonts-ttf" +short_desc="High-performance, multiplayer code editor" +maintainer="SpidFightFR " +license="GPL-3.0-or-later, Apache-2.0, AGPL-3.0-or-later" +homepage="https://zed.dev/" +distfiles="https://github.com/zed-industries/zed/archive/v${version}.tar.gz" +checksum="cd15f80c95ec4c33cbe821ff70e64c3922d1187fa13ac894a8049b615cad2e4f" + +post_install() { + vlicense ${wrksrc}/LICENSE-AGPL + APP_NAME="Zed" DO_STARTUP_NOTIFY="true" APP_ICON="zed" envsubst < ${wrksrc}/crates/zed/resources/zed.desktop.in > ${wrksrc}/crates/zed/resources/zed.desktop + sed -i "s/TryExec=zed/TryExec=Zed/" ${wrksrc}/crates/zed/resources/zed.desktop; + sed -i "s/Exec=zed/Exec=Zed/" ${wrksrc}/crates/zed/resources/zed.desktop; + vinstall ${wrksrc}/crates/zed/resources/zed.desktop 644 usr/share/applications/ + vinstall ${wrksrc}/crates/zed/resources/app-icon.png 644 usr/share/icons/hicolor/512x512/apps/ zed.png +}