Skip to content
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

vscodium: Symlink backwards-compabible vscodium executable #63522

Closed
wants to merge 1 commit into from

Conversation

Synthetica9
Copy link
Member

@Synthetica9 Synthetica9 commented Jun 19, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor

Can we make it so if either preInstall or postInstall are present their hooks are ran in installPhase but not required? We also need it to be applied for darwin.

@Synthetica9
Copy link
Member Author

Can we make it so if either preInstall or postInstall are present their hooks are ran in installPhase but not required? We also need it to be applied for darwin.

I'm not sure I understand what you mean.

@@ -33,6 +33,11 @@ in

sourceRoot = ".";

postInstall = ''
# Install legacy support:
ln -s $out/bin/${executableName} $out/bin/vscodium
Copy link
Member

@Mic92 Mic92 Jun 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why we need a backwards-compatible symlink? Do upstream or other linux distributions provide such a symlink?

@@ -69,6 +70,8 @@ in

installPhase =
if system == "x86_64-darwin" then ''
runHook preInstall

mkdir -p $out/lib/vscode $out/bin
cp -r ./* $out/lib/vscode
ln -s $out/lib/vscode/Contents/Resources/app/bin/${executableName} $out/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ln -s $out/lib/vscode/Contents/Resources/app/bin/${executableName} $out/bin
ln -s $out/lib/vscode/Contents/Resources/app/bin/${executableName} $out/bin
runHook postInstall

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need preInstall after the else too.

@worldofpeace
Copy link
Contributor

I'm not sure this would be relevant to users anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants