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

lsp-ai: init at 0.7.0 #343184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ProjectInitiative
Copy link
Contributor

Description of changes

Changelog

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

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.

@ProjectInitiative
Copy link
Contributor Author

Something is wrong with how the formatter is handling the maintainers file. Going to keep working on that.

@ProjectInitiative
Copy link
Contributor Author

ProjectInitiative commented Sep 20, 2024

Split out maintainer PR. Now dependent on #343193

@cu1ch3n
Copy link
Member

cu1ch3n commented Sep 20, 2024

I think you can submit a single PR (lsp-ai: init at 0.7.0) containing two commits:

  • maintainers: add projectinitiative
  • lsp-ai: init at 0.7.0

@cu1ch3n cu1ch3n mentioned this pull request Sep 20, 2024
13 tasks
inherit pname version src;

cargoLock = {
lockFile = src + "/Cargo.lock";
Copy link
Member

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.

Copy link
Member

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";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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; {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meta = with lib; {
meta = {

Better to avoid this

Comment on lines +48 to +50
OPENSSL_DIR = "${openssl.dev}";
OPENSSL_LIB_DIR = "${openssl.out}/lib";
RUSTFLAGS = "-C target-cpu=native";
Copy link
Member

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.

Comment on lines +12 to +25
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;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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;
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
openssl.dev

It's already included

nativeBuildInputs = [
pkg-config
cmake
perl
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
perl

I guess that openssl-sys stuff is only using perl when OPENSSL_NO_VENDOR = 1; isn't set?

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.

4 participants