-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
lsp-ai: init at 0.7.0 #343184
base: master
Are you sure you want to change the base?
lsp-ai: init at 0.7.0 #343184
Conversation
b9815db
to
edca846
Compare
Something is wrong with how the formatter is handling the maintainers file. Going to keep working on that. |
edca846
to
5adeaf2
Compare
Split out maintainer PR. Now dependent on #343193 |
5adeaf2
to
985a902
Compare
I think you can submit a single PR (lsp-ai: init at 0.7.0) containing two commits:
|
inherit pname version src; | ||
|
||
cargoLock = { | ||
lockFile = src + "/Cargo.lock"; |
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 won't work. It's an Input From Derivation (IFD) because the content of Cargo.lock is parsed in Nix code and the crates are converted to individual derivations. If there are git+
in Cargo.lock you have to also upload it.
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.
RUSTFLAGS = "-C target-cpu=native"; | ||
|
||
meta = with lib; { | ||
description = "An open-source language server that serves as a backend for AI-powered functionality"; |
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.
description = "An open-source language server that serves as a backend for AI-powered functionality"; | |
description = "Open-source language server that serves as a backend for AI-powered functionality"; |
OPENSSL_LIB_DIR = "${openssl.out}/lib"; | ||
RUSTFLAGS = "-C target-cpu=native"; | ||
|
||
meta = with lib; { |
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.
meta = with lib; { | |
meta = { |
Better to avoid this
OPENSSL_DIR = "${openssl.dev}"; | ||
OPENSSL_LIB_DIR = "${openssl.out}/lib"; | ||
RUSTFLAGS = "-C target-cpu=native"; |
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.
These three should not be needed, and the third is breaking cross compilation. Try removing them.
let | ||
pname = "lsp-ai"; | ||
version = "0.7.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SilasMarvin"; | ||
repo = pname; | ||
rev = "66655f6285fe8aad8f2d72646e9ed47c06245525"; | ||
hash = "sha256-DwqqZBzLevuRCW6QzGyWdE+JtpW6b3EMDuiWtajv/U4="; | ||
}; | ||
|
||
in | ||
rustPlatform.buildRustPackage { | ||
inherit pname version src; |
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.
let | |
pname = "lsp-ai"; | |
version = "0.7.0"; | |
src = fetchFromGitHub { | |
owner = "SilasMarvin"; | |
repo = pname; | |
rev = "66655f6285fe8aad8f2d72646e9ed47c06245525"; | |
hash = "sha256-DwqqZBzLevuRCW6QzGyWdE+JtpW6b3EMDuiWtajv/U4="; | |
}; | |
in | |
rustPlatform.buildRustPackage { | |
inherit pname version src; | |
rustPlatform.buildRustPackage { | |
pname = "lsp-ai"; | |
version = "0.7.0"; | |
src = fetchFromGitHub { | |
owner = "SilasMarvin"; | |
repo = "lsp-ai"; | |
rev = "66655f6285fe8aad8f2d72646e9ed47c06245525"; | |
hash = "sha256-DwqqZBzLevuRCW6QzGyWdE+JtpW6b3EMDuiWtajv/U4="; | |
}; |
|
||
buildFeatures = [ "all" ]; | ||
|
||
doCheck = false; |
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.
If there's any individual test failure, try disable it: https://nixos.org/manual/nixpkgs/unstable/#disabling-package-tests
]; | ||
buildInputs = [ | ||
openssl | ||
openssl.dev |
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.
openssl.dev |
It's already included
nativeBuildInputs = [ | ||
pkg-config | ||
cmake | ||
perl |
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.
perl |
I guess that openssl-sys stuff is only using perl when OPENSSL_NO_VENDOR = 1;
isn't set?
Description of changes
Changelog
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Note:
nixpkgs-review
fails due to the IFD issue with using cargoLock. Currently don't know a good way around this since some of the packages in the lock file are from GitHub and don't have available cargoHashes. Suggestions welcome!Add a 👍 reaction to pull requests you find important.