Skip to content

Comments

fix: regex pattern breaks for `NVRM version: NVIDIA UNIX Open Kernel …#218

Open
tom-ainc wants to merge 1 commit intonix-community:mainfrom
tom-ainc:main
Open

fix: regex pattern breaks for `NVRM version: NVIDIA UNIX Open Kernel …#218
tom-ainc wants to merge 1 commit intonix-community:mainfrom
tom-ainc:main

Conversation

@tom-ainc
Copy link

@tom-ainc tom-ainc commented Jan 5, 2026

Changes the regex pattern to work with the latest nvidia driver version info (See issue #217 (comment) ).

$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64  590.48.01  Release Build
                                                                                          ^^^^^^^^^
                                                                                          Broke the regex!

@fagg
Copy link

fagg commented Jan 22, 2026

This also fixes it for me (though I have a different driver version):

hydra$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64  580.105.08  Release Build  (abuild@OBS)  Thu Dec 11 15:49:40 UTC 2025
GCC version:  gcc version 15.2.1 20251006 (SUSE Linux)

I'll put this here to help others: you can actually build your own derivation with a known/hard-coded version. I do this on some of my machines.

Create a flake.nix with this:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
    nixgl.url = "github:nix-community/nixGL";
  };

  outputs = { self, nixpkgs, nixgl }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { 
        inherit system; 
        config = {
          allowUnfree = true;
        };
      };

      nixGL_custom = pkgs.callPackage (nixgl.outPath + "/default.nix") {
        nvidiaVersion = "580.105.08";
        nvidiaHash = "sha256-2cboGIZy8+t03QTPpp3VhHn6HQFiyMKMjRdiV2MpNHU=";
      };
    in {
      packages.${system} = {
        nixGLNvidia = nixGL_custom.nixGLNvidia;
        nixVulkanNvidia = nixGL_custom.nixVulkanNvidia;
      };
    };
}

You can get the sha256 hash ahead of time by running:

hydra$ ver="580.105.08"
hydra$ url="https://download.nvidia.com/XFree86/Linux-x86_64/${ver}/NVIDIA-Linux-x86_64-${ver}.run"
hydra$ nix store prefetch-file --hash-type sha256 "$url"
Downloaded 'https://download.nvidia.com/XFree86/Linux-x86_64/580.105.08/NVIDIA-Linux-x86_64-580.105.08.run' to '/nix/store/20y2iywhlzzzvpvh4yscpgm55fv16wjx-NVIDIA-Linux-x86_64-580.105.08.run' (hash 'sha256-2cboGIZy8+t03QTPpp3VhHn6HQFiyMKMjRdiV2MpNHU=').

And to evaluate: nix build .#nixGLNvidia

There may be a better way to do it, but this works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants