Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ The goal of this project is to make VS Code server work with NixOS, anything mor
```nix
{
services.vscode-server.postPatch = ''
bin=$1
bin_dir=${config.services.vscode-server.installPath}/bin/$bin
bin_dir=$1
# $bin_dir (vscode 1.105.1) is something like
# ~/.vscode-server/cli/servers/Stable-7d842fb85a0275a4a8e4d7e040d2625abbf7f084/server
# ...
'';
}
Expand Down
11 changes: 10 additions & 1 deletion pkgs/auto-fix-vscode-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,21 @@
while read -rd ''' elf; do
patch_elf "$elf"
done < <(find "$bin_dir" -type f -perm -100 -printf '%p\0')
# Refer to https://github.com/NixOS/nixpkgs/issues/405528.
# For whatever reason, libssl is required but absent from DT_NEEDED.
vsce_sign_bin="$bin_dir/node_modules/@vscode/vsce-sign/bin/vsce-sign"
if [[ -f "$vsce_sign_bin" ]]; then
patchelf \
--add-needed ${lib.getLib openssl}/lib/libssl.so \
"$vsce_sign_bin"
fi
''}
# Mark the bin directory as being fully patched.
echo 1 > "$patched_file"
${optionalString (postPatch != "") ''${writeShellScript "post-patchelf-vscode-server" postPatch} "$bin"''}
${optionalString (postPatch != "") ''${writeShellScript "post-patchelf-vscode-server" postPatch} "$bin_dir"''}
'';
};

Expand Down