New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode-with-extensions: fix insiders build #71251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't seem to have this problem but change looks fine nonetheless.
|
Extensions are no longer unwrapped to the /share directory so the extensions' derivations do not have to know about VSCode's package name.
66ebff3
to
bb24faf
Compare
This made me realize that since the unpacked extensions and the combined extensions derivation are both completely independent of the VSCode version they'll eventually be used for, I could remove their dependency on it. |
Seems fine to me. A nice cleanup / simplification too. |
If this is ready and #71264 has stalled, let's merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds/Executes fine [still] on my system.
No rejections here, just don't have time to review it. |
I'm in favor of this PR I guess. |
|
||
inherit vscodeExtUniqueId; | ||
inherit configurePhase buildPhase dontPatchELF dontStrip; | ||
|
||
installPrefix = "share/${extendedPkgName}/extensions/${vscodeExtUniqueId}"; | ||
installPrefix = "${vscodeExtUniqueId}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What bothers me is that now, an extension no longer stand as a standard package which could simply be installed in an environment using nix-env. It this really a use case, I'm not sure.
In case we want to treat those extensions as standalone packages, stuff like this really should end up under the lfs share folder and the namespace under share being fairly unique. It was the approach taken by vim plugins which I initially took inspiration from.
It might even end up being required by licenses to expose the source code / files when installing vscode-with-extensions
/vscodium-with-extensions
/etc (is it?).
How about instead just outputting those under something more straigtforward such as: share/vscode/extensions/${vscodeExtUniqueId}
regardless of the wrapped executable? This is what has been suggested in #76494.
Note that this is not a strong opinion. Anyone else interested in providing more insight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very good point! However that isn't a perfect solution, since Insiders versions of VSCode need their extensions to be in an appropriately named directory.
I wonder how many people actually use Nix-managed extensions but do not use them via vscode-with-extensions, but I agree that it's good to support it on principle.
My suggestion is that we have the extension derivations like they are now, and provide versions of them that have been symlinked to the appropriate place that people can use. This means the path could be varied depending on whether they use an Insiders version or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insiders versions of VSCode need their extensions to be in an appropriately named directory.
I'm not sure to quite understand in what regards the current PR changes that and what exactly is the distinction in terms of extension location?
Fix extension path symlink error caused by NixOS/nixpkgs#71251, which removes /share/{wrappedPkgName}/extensions from the extension install path
Fix extension path symlink error caused by [1], which removes `/share/{wrappedPkgName}/extensions` from the extension install path. [1] NixOS/nixpkgs#71251 PR #1100
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
Extensions are no longer unwrapped to the /share directory so the
extensions' derivations do not have to know about VSCode's package name.
Motivation for this change
Without this patch overriding the
vscode
used byvscode-with-extensions
withisInsiders = true
has VSCode fail to start because it tries to create acode-insiders
directory inside the read-only combined extensions derivation output because it is instructed to use that nonexistent one as its extension directory.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @eadwu @jraygauthier