Skip to content

v-analyzer: init at 0.0.6-unstable-2025-07-08 #425973

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

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

Conversation

cilki
Copy link
Member

@cilki cilki commented Jul 17, 2025

Add initial v-analyzer package for IDE support with V. Closes #294566.

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/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 17, 2025
Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

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

A couple of nitpicks

src = fetchFromGitHub {
owner = "vlang";
repo = "v-analyzer";
rev = finalAttrs.version;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rev = finalAttrs.version;
tag = finalAttrs.version;

buildPhase = ''
runHook preBuild

export HOME=$(mktemp -d)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export HOME=$(mktemp -d)

instead, add writableTmpDirAsHomeHook to nativeBuildInputs

Comment on lines 41 to 52
meta = with lib; {
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
homepage = "https://github.com/vlang/v-analyzer";
changelog = "https://github.com/vlang/v-analyzer/releases/tag/${finalAttrs.version}";
license = licenses.mit;
maintainers = with maintainers; [ cilki ];
platforms = platforms.unix;
mainProgram = "v-analyzer";
};
Copy link
Contributor

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; {
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
homepage = "https://github.com/vlang/v-analyzer";
changelog = "https://github.com/vlang/v-analyzer/releases/tag/${finalAttrs.version}";
license = licenses.mit;
maintainers = with maintainers; [ cilki ];
platforms = platforms.unix;
mainProgram = "v-analyzer";
};
meta = {
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
homepage = "https://github.com/vlang/v-analyzer";
changelog = "https://github.com/vlang/v-analyzer/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cilki ];
platforms = lib.platforms.unix;
mainProgram = "v-analyzer";
};

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 17, 2025
@cilki
Copy link
Member Author

cilki commented Jul 18, 2025

Fixed those, PTAL.

@acid-bong
Copy link
Contributor

And it fails to build (see the x86_64-linux build in CI)

@cilki cilki changed the title v-analyzer: init at 0.0.6 v-analyzer: init at 0.0.6-unstable-2025-07-08 Jul 21, 2025
@cilki
Copy link
Member Author

cilki commented Jul 21, 2025

@acid-bong Yeah, you're right. I built locally with a vlang that's older than what's currently in nixpkgs. I bumped the v-analyzer commit and it seems to build again.

Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

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

Now regarding the build: is there a way to build it in parallel?

meta = {
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
homepage = "https://github.com/vlang/v-analyzer";
changelog = "https://github.com/vlang/v-analyzer/releases/tag/${finalAttrs.version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
changelog = "https://github.com/vlang/v-analyzer/releases/tag/${finalAttrs.version}";
changelog = "https://github.com/vlang/v-analyzer/blob/${finalAttrs.src.rev}/CHANGELOG.md";

This way unstable commits won't lead to nonexistent tags

@cilki
Copy link
Member Author

cilki commented Jul 22, 2025

Now regarding the build: is there a way to build it in parallel?

You mean have v compile in parallel? It seems the latest version does so by default in prod mode.

'';

meta = {
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
Copy link

Choose a reason for hiding this comment

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

Suggested change
description = "The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";
description = "@vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more";

Not start with the definite or an indefinite article.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: v-analyzer
2 participants