-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Add visual studio code editor #14418
Conversation
By analyzing the blame information on this pull request, we identified @fluffynukeit, @gebner and @travisbhartwell to be potential reviewers |
It's generally better to run |
And 👍 for using RPATH instead of $LD_LIBRARY_PATH, as the latter e.g. "relinks" any child processes, etc. |
Use patchelf instead of wrapProgram to inject lookup path of shared libraries. Allow the nix expression to be called with optional version argument.
8dcae83
to
f147f96
Compare
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Code Editing. Redefined."; |
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.
Please write a more appreciate description.
Ok, thank you all for your input, I have applied the suggested changes. |
Why was vscode put into the "unfree" section of nixpkgs? What are the non-free components in it? |
@ledettwy The binary distribution of vscode is non-free. The source distribution as hosted on github is licensed under MIT, but it cannot access the marketplace (i.e., the extensions) out of the box. It is not clear to me what would happen if we were to patch the open-source version to access the marketplace (you just need to modify a single JSON file). The original vscode derivation (this PR) was built from source, but it is fundamentally broken since it needs to access the network during the build (#14447). The current tracking issue for the from-source build is #26698. |
Not sure what you mean. Free software that connects to non-free servers doesn't stop becoming free software. Browsers can have the capability to download extensions from the Internet and the browser is still free. If you're concerned about the JSON file itself not being free software, doing a clean room implementation of that seems like it would be pretty straightforward. |
The license of the binary build that we use says that "You may not … share, publish, or lend the software". This makes it unfree nonredistributable. |
Oh, so it's the binary version that's in unfree nixpkgs, and the source version (when it works) will go into the free nixpkgs? |
Yes. |
This is the 3rd implementation variant as proposed in #14354. See that issue for details:
electron
to be compatible withvscode
.electron
will have to followvscode
s version requirement in future. TODO: make seperateelectron
nix expression, just forvscode
.wrapProgram
utility topatchELF
itself. The flagdontPatchELF
is needed, because in thefixupPhase
the added$out/bin
rpath is automatically removed. Additionally, bothdontPatchELF
&dontStrip
need to be set tofalse
in order for the binary to run without segfault. TODO: MovepatchELF
topostFixup
.Things done:
nix-build . --option build-use-chroot true -A vscode
)nix-shell -I nixpkgs=/path/to/vscode/branch --pure -p vscode
)nix-shell -p nox --run "nox-review wip --against HEAD~2"
from root of nixpkgs forkelectron
compiles & runsvscode
compiles & runselectron-quick-start
./result/bin/
)More
Fixes issue #14354
cc @travisbhartwell