zed-editor: fix license generation (#352654)

This commit is contained in:
Gaétan Lepage
2024-11-01 00:24:49 +01:00
committed by GitHub
2 changed files with 12 additions and 7 deletions
@@ -1,8 +1,8 @@
diff --git a/script/generate-licenses b/script/generate-licenses
index 43b2f5c458..c740a3afa2 100755
index 9602813f0c..d16d11c203 100755
--- a/script/generate-licenses
+++ b/script/generate-licenses
@@ -15,12 +15,6 @@ cat assets/icons/LICENSES >> $OUTPUT_FILE
@@ -16,16 +16,9 @@ cat assets/icons/LICENSES >> $OUTPUT_FILE
echo -e "# ###### CODE LICENSES ######\n" >> $OUTPUT_FILE
@@ -14,4 +14,8 @@ index 43b2f5c458..c740a3afa2 100755
-fi
echo "Generating cargo licenses"
cargo about generate --fail -c script/licenses/zed-licenses.toml script/licenses/template.hbs.md >> $OUTPUT_FILE
cargo about generate \
- --fail \
-c script/licenses/zed-licenses.toml \
"${TEMPLATE_FILE}" >> $OUTPUT_FILE
+5 -4
View File
@@ -101,6 +101,8 @@ rustPlatform.buildRustPackage rec {
[
# Zed uses cargo-install to install cargo-about during the script execution.
# We provide cargo-about ourselves and can skip this step.
# Until https://github.com/zed-industries/zed/issues/19971 is fixed,
# we also skip any crate for which the license cannot be determined.
./0001-generate-licenses.patch
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
@@ -206,10 +208,9 @@ rustPlatform.buildRustPackage rec {
RUSTFLAGS = if withGLES then "--cfg gles" else "";
gpu-lib = if withGLES then libglvnd else vulkan-loader;
# Enable back when https://github.com/zed-industries/zed/issues/19971 is fixed
# preBuild = ''
# bash script/generate-licenses
# '';
preBuild = ''
bash script/generate-licenses
'';
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf --add-rpath ${gpu-lib}/lib $out/libexec/*