mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
fix permission problem of mutableExtensions
This commit is contained in:
parent
88b972168e
commit
3816b9d036
@ -15,6 +15,12 @@
|
|||||||
let
|
let
|
||||||
nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions;
|
nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions;
|
||||||
mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions;
|
mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions;
|
||||||
|
mutableExtsPaths = lib.forEach mutExtsDrvs ( e:
|
||||||
|
{
|
||||||
|
origin = ''${e}/share/vscode/extensions/${e.vscodeExtUniqueId}'';
|
||||||
|
target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: ''${ext.publisher}.${ext.name}'' == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
#removed not defined extensions
|
#removed not defined extensions
|
||||||
rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) ''
|
rmExtensions = lib.optionalString (nixExtensions++mutableExtensions != []) ''
|
||||||
@ -23,9 +29,12 @@ let
|
|||||||
#copy mutable extension out of the nix store
|
#copy mutable extension out of the nix store
|
||||||
cpExtensions = ''
|
cpExtensions = ''
|
||||||
${lib.concatMapStringsSep "\n" (e : ''ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/'') nixExtsDrvs}
|
${lib.concatMapStringsSep "\n" (e : ''ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/'') nixExtsDrvs}
|
||||||
${lib.concatMapStringsSep "\n" (e : ''
|
${lib.concatMapStringsSep "\n" (ePath : ''
|
||||||
cp -a ${e}/share/vscode/extensions/${e.vscodeExtUniqueId} ${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: ''${ext.publisher}.${ext.name}'' == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}
|
if [ ! -d ${ePath.target} ]; then
|
||||||
'') mutExtsDrvs}
|
cp -a ${ePath.origin} ${ePath.target}
|
||||||
|
chmod -R u+rwx ${ePath.target}
|
||||||
|
fi
|
||||||
|
'') mutableExtsPaths}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
writeShellScriptBin "code" ''
|
writeShellScriptBin "code" ''
|
||||||
|
Loading…
Reference in New Issue
Block a user