|
|
|
@ -81,25 +81,25 @@ let |
|
|
|
|
installPhase = '' |
|
|
|
|
runHook preInstall |
|
|
|
|
'' + (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" |
|
|
|
|
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 '' |
|
|
|
|
mkdir -p $out/lib/vscode $out/bin |
|
|
|
|
cp -r ./* $out/lib/vscode |
|
|
|
|
mkdir -p "$out/lib/vscode" "$out/bin" |
|
|
|
|
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 |
|
|
|
|
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 |
|
|
|
|
mkdir -p "$out/share/applications" |
|
|
|
|
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" |
|
|
|
|
|
|
|
|
|
mkdir -p $out/share/pixmaps |
|
|
|
|
cp $out/lib/vscode/resources/app/resources/linux/code.png $out/share/pixmaps/code.png |
|
|
|
|
mkdir -p "$out/share/pixmaps" |
|
|
|
|
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 |
|
|
|
|
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 |
|
|
|
|
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 |
|
|
|
|
'') + '' |
|
|
|
|
runHook postInstall |
|
|
|
|
''; |
|
|
|
@ -162,9 +162,9 @@ let |
|
|
|
|
|
|
|
|
|
# restore desktop item icons |
|
|
|
|
extraInstallCommands = '' |
|
|
|
|
mkdir -p $out/share/applications |
|
|
|
|
mkdir -p "$out/share/applications" |
|
|
|
|
for item in ${unwrapped}/share/applications/*.desktop; do |
|
|
|
|
ln -s $item $out/share/applications/ |
|
|
|
|
ln -s "$item" "$out/share/applications/" |
|
|
|
|
done |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|