Skip to content

Commit

Permalink
vscode: fix extension path symlink error
Browse files Browse the repository at this point in the history
Fix extension path symlink error caused by [1], which removes
`/share/{wrappedPkgName}/extensions` from the extension install path.

[1] NixOS/nixpkgs#71251

PR nix-community#1100
  • Loading branch information
billksun authored and jorsn committed Apr 25, 2020
1 parent 761539c commit 21c68bb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions modules/programs/vscode.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,11 @@ in
home.file =
let
toPaths = path:
let
p = "${path}/share/vscode/extensions";
in
# Links every dir in p to the extension path.
mapAttrsToList (k: v:
{
"${extensionPath}/${k}".source = "${p}/${k}";
}) (builtins.readDir p);
# Links every dir in path to the extension path.
mapAttrsToList (k: v:
{
"${extensionPath}/${k}".source = "${path}/${k}";
}) (builtins.readDir path);
toSymlink = concatMap toPaths cfg.extensions;
in
foldr
Expand Down

0 comments on commit 21c68bb

Please sign in to comment.