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
Conversation
) {}); | ||
in | ||
super.nvim-typescript.overrideAttrs(old: { | ||
buildInputs = [ nodejs ]; |
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.
this probably isn't needed, as it won't be available at runtime
buildInputs = [ nodejs ]; |
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.
It needs nodejs to run npm run build
though
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.
then it should in nativeBuildInputs
:)
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 | ||
'' | ||
) {}); |
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.
this should fix your evaluation error
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 | |
''; |
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.
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.
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.
No, I think this is not going to work without committing a generated node2nix file.
I'll just close this since the approach here won't work. Thanks for the review! |
Motivation for this change
Add https://github.com/mhartington/nvim-typescript vim plugin
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)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