Navigation Menu

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

vimPlugins.nvim-typescript: Init at 2020-06-06 #89553

Closed
wants to merge 1 commit into from

Conversation

bouk
Copy link
Contributor

@bouk bouk commented Jun 5, 2020

Motivation for this change

Add https://github.com/mhartington/nvim-typescript vim plugin

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is my first nix PR, I only started using it today! I have no idea what I'm doing!

I took the code by @nbardiuk and modified until it worked on my machine.

cc @nbardiuk @lo1tuma

@bouk bouk requested a review from jonringer as a code owner June 5, 2020 16:59
@ofborg ofborg bot added the 6.topic: vim label Jun 5, 2020
) {});
in
super.nvim-typescript.overrideAttrs(old: {
buildInputs = [ nodejs ];
Copy link
Contributor

Choose a reason for hiding this comment

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

this probably isn't needed, as it won't be available at runtime

Suggested change
buildInputs = [ nodejs ];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It needs nodejs to run npm run build though

Copy link
Contributor

Choose a reason for hiding this comment

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

then it should in nativeBuildInputs :)

Comment on lines +716 to +731
nvim-typescript-deps = (callPackage (
runCommand "nvim-typescript-rplugin.nix" {
buildInputs = [ nodePackages.node2nix ];
} ''
mkdir -p $out
cd ${super.nvim-typescript.src}/rplugin/node/nvim_typescript
node2nix --input package.json \
--lock package-lock.json \
--include-peer-dependencies \
--nodejs-10 \
--development \
--output $out/node-packages.nix \
--node-env $out/node-env.nix \
--composition $out/default.nix
''
) {});
Copy link
Contributor

Choose a reason for hiding this comment

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

this should fix your evaluation error

Suggested change
nvim-typescript-deps = (callPackage (
runCommand "nvim-typescript-rplugin.nix" {
buildInputs = [ nodePackages.node2nix ];
} ''
mkdir -p $out
cd ${super.nvim-typescript.src}/rplugin/node/nvim_typescript
node2nix --input package.json \
--lock package-lock.json \
--include-peer-dependencies \
--nodejs-10 \
--development \
--output $out/node-packages.nix \
--node-env $out/node-env.nix \
--composition $out/default.nix
''
) {});
nvim-typescript-deps = runCommand "nvim-typescript-rplugin.nix" {
buildInputs = [ nodePackages.node2nix ];
} ''
mkdir -p $out
cd ${super.nvim-typescript.src}/rplugin/node/nvim_typescript
node2nix --input package.json \
--lock package-lock.json \
--include-peer-dependencies \
--nodejs-10 \
--development \
--output $out/node-packages.nix \
--node-env $out/node-env.nix \
--composition $out/default.nix
'';

Copy link
Contributor

Choose a reason for hiding this comment

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

actually, now that I look at this again, I'm not sure this is correct either. I'm not familiar with using node within nix to give you affirmative answer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I think this is not going to work without committing a generated node2nix file.

@bouk
Copy link
Contributor Author

bouk commented Jun 17, 2020

I'll just close this since the approach here won't work. Thanks for the review!

@bouk bouk closed this Jun 17, 2020
@bouk bouk deleted the nvim-typescript branch June 17, 2020 17:20
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

3 participants