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
sumneko-lua-language-server: init at 1.11.2 #108093
Conversation
d006efb
to
5bb50c6
Compare
buildPhase = '' | ||
cd 3rd/luamake | ||
ninja -f ninja/linux.ninja | ||
cd ../.. | ||
./3rd/luamake/luamake rebuild | ||
''; |
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 would like to use the ninja setup-hook. Can we do something like to do that:
```suggestion
preBuildPhase = ''
cd 3rd/luamake
'';
ninjaFlags = "-f ninja/linux.ninja";
postBuildPhase = ''
cd ../..
./3rd/luamake/luamake rebuild
'';
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 tried that before and I'm not sure why it isn't working
build flags: -j8 -l8 -f ninja/linux.ninja
ninja: error: loading 'ninja/linux.ninja': No such file or directory
ninja: error: loading 'ninja/linux.ninja': No such file or directory
builder for '/nix/store/i8xzv17v3n4z28yr6786k5a2gjvl78xs-sumneko-lua-language-server-1.9.0.drv' failed with exit code 1
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.
Did you add the cd in preBuild?
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 is exactly what I did: https://github.com/mjlbach/nixpkgs/blob/sumneko_build_failure/pkgs/development/tools/sumneko-lua-language-server/default.nix
https://github.com/mjlbach/nixpkgs/blob/78628a94ca35b49b06d938dbe010c399ef765548/pkgs/development/tools/sumneko-lua-language-server/default.nix#L24-L34
patching sources
applying patch /nix/store/3fsc6p3wsv5ainwhjm22agzx13aqx99z-sumneko_home_expansion.patch
patching file main.lua
configuring
no configure script, doing nothing
building
build flags: -j8 -l8 -f ninja/linux.ninja
ninja: error: loading 'ninja/linux.ninja': No such file or directory
error: --- Error ---------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
build of '/nix/store/i8xzv17v3n4z28yr6786k5a2gjvl78xs-sumneko-lua-language-server-1.9.0.drv' failed
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.
Because it is preBuild and postBuild without phase. Also if you execute ninja you need to add -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
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.
When I add those to ninja flags I get an error, am I doing it wrong?
ninjaFlags = [
"-f ninja/linux.ninja"
"-j$NIX_BUILD_CORES"
"-l$NIX_BUILD_CORES"
];
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 is a semi-automatic executed nixpkgs-review. If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC. Result of 1 package built:
|
ec53c3a
to
0da72cb
Compare
Fix was upstreamed Just waiting on a release. |
@mjlbach thx for push this into upstream, I've packaged it in my private overlay together with vscode extension it was frustrated experience.. anyway your version is much more cleaner then mine. |
My version is only cleaner because of upstream patches 😆 You're welcome! Hopefully 1.9.1 gets cut soon and we can get this in. |
c858875
to
2b60e35
Compare
@SuperSandro2000 This should be good to go, I removed the in-tree patch. |
e09c391
to
8e36141
Compare
8e36141
to
a57ba9e
Compare
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 1 package built:
|
Motivation for this change
sumneko-lua-language-server: init at 1.11.2
Things I'm not happy with.
Currently sumneko requires that lua-language-server, bee.so, lpeglabel.so are all in the same directory, so with this derivation they are all in bin which pollutes pathCurrently sumneko does not expand "~" to home directory, so logs write in "~" (prior to some upstreamed patches, it was always writing to "root" which would default into nix store. I'm not sure if this can be addressed with wrap program or has to be fixed within sumnekoI wrote a pretty large in-tree patch to work around this, so not happy about that either.Both fixed, not sure if the former could have been done more cleanly/if extras is the appropriate directory to redirect to, and the latter required a fairly lengthy patch which is mostly copying functions from penlight.
It won't work on mac, since it requires MacOS 10.13 SDK to build.
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)