vscode: quote variables (#142735)
This commit is contained in:
parent
cd2b95a439
commit
d1542854f6
1 changed files with 14 additions and 14 deletions
|
@ -81,25 +81,25 @@ let
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
'' + (if stdenv.isDarwin then ''
|
'' + (if stdenv.isDarwin then ''
|
||||||
mkdir -p "$out/Applications/${longName}.app" $out/bin
|
mkdir -p "$out/Applications/${longName}.app" "$out/bin"
|
||||||
cp -r ./* "$out/Applications/${longName}.app"
|
cp -r ./* "$out/Applications/${longName}.app"
|
||||||
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" $out/bin/${executableName}
|
ln -s "$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}" "$out/bin/${executableName}"
|
||||||
'' else ''
|
'' else ''
|
||||||
mkdir -p $out/lib/vscode $out/bin
|
mkdir -p "$out/lib/vscode" "$out/bin"
|
||||||
cp -r ./* $out/lib/vscode
|
cp -r ./* "$out/lib/vscode"
|
||||||
|
|
||||||
ln -s $out/lib/vscode/bin/${sourceExecutableName} $out/bin/${executableName}
|
ln -s "$out/lib/vscode/bin/${sourceExecutableName}" "$out/bin/${executableName}"
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p "$out/share/applications"
|
||||||
ln -s $desktopItem/share/applications/${executableName}.desktop $out/share/applications/${executableName}.desktop
|
ln -s "$desktopItem/share/applications/${executableName}.desktop" "$out/share/applications/${executableName}.desktop"
|
||||||
ln -s $urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop $out/share/applications/${executableName}-url-handler.desktop
|
ln -s "$urlHandlerDesktopItem/share/applications/${executableName}-url-handler.desktop" "$out/share/applications/${executableName}-url-handler.desktop"
|
||||||
|
|
||||||
mkdir -p $out/share/pixmaps
|
mkdir -p "$out/share/pixmaps"
|
||||||
cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png
|
cp "$out/lib/vscode/resources/app/resources/linux/code.png" "$out/share/pixmaps/code.png"
|
||||||
|
|
||||||
# Override the previously determined VSCODE_PATH with the one we know to be correct
|
# Override the previously determined VSCODE_PATH with the one we know to be correct
|
||||||
sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName}
|
sed -i "/ELECTRON=/iVSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}"
|
||||||
grep -q "VSCODE_PATH='$out/lib/vscode'" $out/bin/${executableName} # check if sed succeeded
|
grep -q "VSCODE_PATH='$out/lib/vscode'" "$out/bin/${executableName}" # check if sed succeeded
|
||||||
'') + ''
|
'') + ''
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -162,9 +162,9 @@ let
|
||||||
|
|
||||||
# restore desktop item icons
|
# restore desktop item icons
|
||||||
extraInstallCommands = ''
|
extraInstallCommands = ''
|
||||||
mkdir -p $out/share/applications
|
mkdir -p "$out/share/applications"
|
||||||
for item in ${unwrapped}/share/applications/*.desktop; do
|
for item in ${unwrapped}/share/applications/*.desktop; do
|
||||||
ln -s $item $out/share/applications/
|
ln -s "$item" "$out/share/applications/"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue