vscode: fix extension path symlink error

Fix extension path symlink error caused by [1], which removes
`/share/{wrappedPkgName}/extensions` from the extension install path.

[1] https://github.com/NixOS/nixpkgs/pull/71251

PR #1100
This commit is contained in:
Bill Sun 2020-03-17 22:40:21 -07:00 committed by Robert Helgesson
parent 0f11a79e02
commit fe145b12cd
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -78,14 +78,11 @@ in
home.file = home.file =
let let
toPaths = path: toPaths = path:
let # Links every dir in path to the extension path.
p = "${path}/share/vscode/extensions"; mapAttrsToList (k: v:
in {
# Links every dir in p to the extension path. "${extensionPath}/${k}".source = "${path}/${k}";
mapAttrsToList (k: v: }) (builtins.readDir path);
{
"${extensionPath}/${k}".source = "${p}/${k}";
}) (builtins.readDir p);
toSymlink = concatMap toPaths cfg.extensions; toSymlink = concatMap toPaths cfg.extensions;
in in
foldr foldr