Update vscode-insiders package for improved platform support and permissions handling
Some checks failed
CI / check (push) Successful in 4s
CI / list-packages (push) Successful in 3s
CI / build (helium) (push) Successful in 4s
CI / build (pjsk-cursor) (push) Successful in 3s
CI / build (vscode-insiders) (push) Failing after 16s
CI / build (waterfox-bin) (push) Successful in 4s
CI / build (xcursor-mizuki) (push) Successful in 2s
Some checks failed
CI / check (push) Successful in 4s
CI / list-packages (push) Successful in 3s
CI / build (helium) (push) Successful in 4s
CI / build (pjsk-cursor) (push) Successful in 3s
CI / build (vscode-insiders) (push) Failing after 16s
CI / build (waterfox-bin) (push) Successful in 4s
CI / build (xcursor-mizuki) (push) Successful in 2s
This commit is contained in:
parent
e880422959
commit
96d4beeb6b
1 changed files with 41 additions and 2 deletions
|
|
@ -8,17 +8,20 @@ let
|
||||||
if stdenv.hostPlatform.isAarch64 then {
|
if stdenv.hostPlatform.isAarch64 then {
|
||||||
url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-arm64-dmg";
|
url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-arm64-dmg";
|
||||||
sha256 = "sha256-K+U6JtVNz1PRzL/0SIEK7RXwQu6LL3p+248Ywbn+mDc=";
|
sha256 = "sha256-K+U6JtVNz1PRzL/0SIEK7RXwQu6LL3p+248Ywbn+mDc=";
|
||||||
|
name = "vscode-insiders-darwin-arm64.dmg";
|
||||||
} else {
|
} else {
|
||||||
url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-x64-dmg";
|
url = "https://code.visualstudio.com/sha/download?build=insider&os=darwin-x64-dmg";
|
||||||
sha256 = "sha256-ex0ESS9APZxgc7b96Q7EQbckUXE51LmTqDfsnN07W3I=";
|
sha256 = "sha256-ex0ESS9APZxgc7b96Q7EQbckUXE51LmTqDfsnN07W3I=";
|
||||||
|
name = "vscode-insiders-darwin-x64.dmg";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
|
url = "https://code.visualstudio.com/sha/download?build=insider&os=linux-x64";
|
||||||
sha256 = "sha256-kE99FyilwwFv3zTCkufGwD3s1WwoJ2krg10l3Xy5PRE=";
|
sha256 = "sha256-kE99FyilwwFv3zTCkufGwD3s1WwoJ2krg10l3Xy5PRE=";
|
||||||
|
name = "vscode-insiders-linux-x64.tar.gz";
|
||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
inherit (sysAttrs) url sha256;
|
inherit (sysAttrs) url sha256 name;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
@ -31,6 +34,16 @@ in
|
||||||
|
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
|
sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin ".";
|
||||||
|
|
||||||
|
postUnpack = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
export sourceRoot="$(ls -d *.app)"
|
||||||
|
chmod -R +w "$sourceRoot"
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = (oldAttrs.nativeBuildInputs or [])
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ pkgs.undmg pkgs.darwin.xattr ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
(oldAttrs.buildInputs or [])
|
(oldAttrs.buildInputs or [])
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
|
|
@ -39,16 +52,41 @@ in
|
||||||
pkgs.webkitgtk_4_1
|
pkgs.webkitgtk_4_1
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = lib.optionalString stdenv.hostPlatform.isLinux ''
|
prePatch = if stdenv.hostPlatform.isDarwin then ''
|
||||||
|
${oldAttrs.prePatch or ""}
|
||||||
|
|
||||||
|
mkdir -p Contents/Resources/app/node_modules/@vscode/ripgrep/bin
|
||||||
|
touch Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg
|
||||||
|
'' else if stdenv.hostPlatform.isLinux then ''
|
||||||
${oldAttrs.prePatch or ""}
|
${oldAttrs.prePatch or ""}
|
||||||
|
|
||||||
mkdir -p resources/app/node_modules/@vscode/ripgrep/bin
|
mkdir -p resources/app/node_modules/@vscode/ripgrep/bin
|
||||||
touch resources/app/node_modules/@vscode/ripgrep/bin/rg
|
touch resources/app/node_modules/@vscode/ripgrep/bin/rg
|
||||||
|
'' else "";
|
||||||
|
|
||||||
|
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
cp -r . $out/Applications/Visual\ Studio\ Code\ -\ Insiders.app
|
||||||
|
|
||||||
|
# Create a wrapper script in bin/ to launch the app
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat > $out/bin/code-insiders << 'EOF'
|
||||||
|
#!/bin/sh
|
||||||
|
exec "$out/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron" "$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/code-insiders
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup =
|
preFixup =
|
||||||
if stdenv.hostPlatform.isDarwin then ''
|
if stdenv.hostPlatform.isDarwin then ''
|
||||||
${oldAttrs.preFixup or ""}
|
${oldAttrs.preFixup or ""}
|
||||||
|
|
||||||
|
# Fix executable permissions in the app bundle
|
||||||
|
chmod +x "Contents/MacOS/Electron"
|
||||||
|
find Contents -type f -perm +111 -exec chmod +x {} \;
|
||||||
|
|
||||||
|
# Make the app executable for Gatekeeper/notarization checks
|
||||||
|
xattr -d com.apple.quarantine . 2>/dev/null || true
|
||||||
'' else ''
|
'' else ''
|
||||||
${oldAttrs.preFixup or ""}
|
${oldAttrs.preFixup or ""}
|
||||||
|
|
||||||
|
|
@ -57,5 +95,6 @@ in
|
||||||
|
|
||||||
meta = (oldAttrs.meta or {}) // {
|
meta = (oldAttrs.meta or {}) // {
|
||||||
mainProgram = "code-insiders";
|
mainProgram = "code-insiders";
|
||||||
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue