vscode: quote variables (#142735)

authored by

Kreyren and committed by
GitHub
d1542854 cd2b95a4

+14 -14
+14 -14
pkgs/applications/editors/vscode/generic.nix
··· 81 installPhase = '' 82 runHook preInstall 83 '' + (if stdenv.isDarwin then '' 84 - mkdir -p "$out/Applications/${longName}.app" $out/bin 85 cp -r ./* "$out/Applications/${longName}.app" 86 - ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" $out/bin/${executableName} 87 '' else '' 88 - mkdir -p $out/lib/vscode $out/bin 89 - cp -r ./* $out/lib/vscode 90 91 - ln -s $out/lib/vscode/bin/${sourceExecutableName} $out/bin/${executableName} 92 93 - mkdir -p $out/share/applications 94 - ln -s $desktopItem/share/applications/${executableName}.desktop $out/share/applications/${executableName}.desktop 95 - ln -s $urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop $out/share/applications/${executableName}-url-handler.desktop 96 97 - mkdir -p $out/share/pixmaps 98 - cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png 99 100 # Override the previously determined VSCODE_PATH with the one we know to be correct 101 - sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName} 102 - grep -q "VSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName} # check if sed succeeded 103 '') + '' 104 runHook postInstall 105 ''; ··· 162 163 # restore desktop item icons 164 extraInstallCommands = '' 165 - mkdir -p $out/share/applications 166 for item in ${unwrapped}/share/applications/*.desktop; do 167 - ln -s $item $out/share/applications/ 168 done 169 ''; 170
··· 81 installPhase = '' 82 runHook preInstall 83 '' + (if stdenv.isDarwin then '' 84 + mkdir -p "$out/Applications/${longName}.app" "$out/bin" 85 cp -r ./* "$out/Applications/${longName}.app" 86 + ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}" 87 '' else '' 88 + mkdir -p "$out/lib/vscode" "$out/bin" 89 + cp -r ./* "$out/lib/vscode" 90 91 + ln -s "$out/lib/vscode/bin/${sourceExecutableName}" "$out/bin/${executableName}" 92 93 + mkdir -p "$out/share/applications" 94 + ln -s "$desktopItem/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop" 95 + ln -s "$urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop" "$out/share/applications/${executableName}-url-handler.desktop" 96 97 + mkdir -p "$out/share/pixmaps" 98 + cp "$out/lib/vscode/resources/app/resources/linux/code.png" "$out/share/pixmaps/code.png" 99 100 # Override the previously determined VSCODE_PATH with the one we know to be correct 101 + sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" 102 + grep -q "VSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" # check if sed succeeded 103 '') + '' 104 runHook postInstall 105 ''; ··· 162 163 # restore desktop item icons 164 extraInstallCommands = '' 165 + mkdir -p "$out/share/applications" 166 for item in ${unwrapped}/share/applications/*.desktop; do 167 + ln -s "$item" "$out/share/applications/" 168 done 169 ''; 170