vscode: add hicolor icon (#473423)

This commit is contained in:
Aleksana
2025-12-28 10:51:02 +00:00
committed by GitHub
+9 -1
View File
@@ -57,6 +57,7 @@
ripgrep,
hasVsceSign ? false,
patchVSCodePath ? true,
imagemagick,
}:
stdenv.mkDerivation (
@@ -249,6 +250,7 @@ stdenv.mkDerivation (
nativeBuildInputs = [
unzip
imagemagick
]
++ lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
@@ -289,7 +291,13 @@ stdenv.mkDerivation (
# These are named vscode.png, vscode-insiders.png, etc to match the name in upstream *.deb packages.
+ ''
mkdir -p "$out/share/pixmaps"
cp "$out/lib/${libraryName}/resources/app/resources/linux/code.png" "$out/share/pixmaps/${iconName}.png"
icon_file="$out/lib/${libraryName}/resources/app/resources/linux/code.png"
cp "$icon_file" "$out/share/pixmaps/${iconName}.png"
# Dynamically determine size of icon and place in appropriate directory
size=$(identify -format "%wx%h" "$icon_file")
mkdir -p "$out/share/icons/hicolor/$size/apps"
cp "$icon_file" "$out/share/icons/hicolor/$size/apps/${iconName}.png"
''
)
# Override the previously determined VSCODE_PATH with the one we know to be correct