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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

glsl_analyzer: init at 1.4.5 #295076

Merged
merged 2 commits into from
May 11, 2024
Merged

glsl_analyzer: init at 1.4.5 #295076

merged 2 commits into from
May 11, 2024

Conversation

wr7
Copy link
Contributor

@wr7 wr7 commented Mar 11, 2024

Description of changes

Created a package for glsl_analyzer. This is a language server for the OpenGL Shading Language. Currently the only other GLSL language server on Nix is glslls, but it's slightly buggy and has worse descriptions compared to glsl_analyzer.

I've been using this package for a while, it seems to fully work.

Package screenshot

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.05 Release Notes (or backporting 23.05 and 23.11 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.

Add a 馃憤 reaction to pull requests you find important.

@wr7
Copy link
Contributor Author

wr7 commented Mar 13, 2024

It seems that the Darwin build failed with error: unable to create compilation: DarwinSdkNotFound. This seems like an issue with upstream Zig. The only reference that I could find to this is here. I'm just going to add Darwin as a badPlatform.

@purcell
Copy link
Member

purcell commented Apr 6, 2024

It seems that the Darwin build failed with error: unable to create compilation: DarwinSdkNotFound. This seems like an issue with upstream Zig. The only reference that I could find to this is ziglang/zig#10217 (comment). I'm just going to add Darwin as a badPlatform.

Zig in nixpkgs fails to build on aarch64-darwin with exactly that error when the sandbox is enabled. I found this locally in an unrelated setting and disabling the sandbox fixed it.

1 similar comment
@purcell
Copy link
Member

purcell commented Apr 6, 2024

It seems that the Darwin build failed with error: unable to create compilation: DarwinSdkNotFound. This seems like an issue with upstream Zig. The only reference that I could find to this is ziglang/zig#10217 (comment). I'm just going to add Darwin as a badPlatform.

Zig in nixpkgs fails to build on aarch64-darwin with exactly that error when the sandbox is enabled. I found this locally in an unrelated setting and disabling the sandbox fixed it.

@wr7
Copy link
Contributor Author

wr7 commented Apr 6, 2024

It seems that the Darwin build failed with error: unable to create compilation: DarwinSdkNotFound. This seems like an issue with upstream Zig. The only reference that I could find to this is ziglang/zig#10217 (comment). I'm just going to add Darwin as a badPlatform.

Zig in nixpkgs fails to build on aarch64-darwin with exactly that error when the sandbox is enabled. I found this locally in an unrelated setting and disabling the sandbox fixed it.

So is there any way to fix this for the package? I got that error from OFBorg. I would assume that the Hydra would have the same error when building the package for Darwin.

@purcell
Copy link
Member

purcell commented Apr 8, 2024

I didn't figure out what the fix might be, sorry, and didn't keep the error around long enough to file a primary bug against the zig derivation.

@wr7
Copy link
Contributor Author

wr7 commented Apr 21, 2024

It seems the same issue was happening to zls. Going off of the pull request there (#290196), I've likely fixed the issue.

@wr7
Copy link
Contributor Author

wr7 commented Apr 21, 2024

Zig 12 was recently released, but it makes sense to still use Zig 11 because using Zig 12 requires more patching than Zig 11.

@wr7
Copy link
Contributor Author

wr7 commented Apr 27, 2024

Upstream now compiles with Zig 12 (nolanderc/glsl_analyzer#56). I've just updated the package to use that instead of my Zig 11 patch.

I also rebased.

@Aleksanaa
Copy link
Member

Aleksanaa commented Apr 27, 2024

Could we add something like

postPatch = ''
  substituteInPlace build.zig \
    --replace-fail 'b.run(&.{ "git", "describe", "--tags", "--always" })' '"${src.rev}"'
'';

To replace https://github.com/nolanderc/glsl_analyzer/blob/da890897ef5c4b1e6328cd614ed1808f00a0d351/build.zig#L100

@Aleksanaa
Copy link
Member

leaveDotGit is potentially not deterministic so we'd better avoid it

@wr7
Copy link
Contributor Author

wr7 commented Apr 27, 2024

leaveDotGit is potentially not deterministic so we'd better avoid it

Good to know. I've just applied your suggestion, and glsl_analyzer --version still works.

Thanks

@wr7 wr7 force-pushed the glsl_analyzer branch 2 times, most recently from 6401d72 to 32a5066 Compare April 27, 2024 12:52
@wr7
Copy link
Contributor Author

wr7 commented Apr 27, 2024

I also realized that the commit description was no-longer accurate. I just removed it.

@wr7 wr7 changed the title glsl_analyzer: init at 1.4.4 glsl_analyzer: init at 1.4.5 Apr 29, 2024
@wr7
Copy link
Contributor Author

wr7 commented Apr 29, 2024

A new version was just released. It makes sense to just use that instead.

@pluiedev
Copy link
Contributor

Result of nixpkgs-review pr 295076 run on x86_64-linux 1

1 package built:
  • glsl_analyzer

@Aleksanaa Aleksanaa merged commit 9f7053f into NixOS:master May 11, 2024
27 of 28 checks passed
@wr7 wr7 deleted the glsl_analyzer branch May 11, 2024 17:46
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.

None yet

7 participants