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

Error while running nix-shell with nixGL on archlinux #127

Open
jcelerier opened this issue Mar 28, 2023 · 4 comments
Open

Error while running nix-shell with nixGL on archlinux #127

jcelerier opened this issue Mar 28, 2023 · 4 comments

Comments

@jcelerier
Copy link

I'm getting this when trying to step into nix:

$ nix-shell
building '/nix/store/08saqbyv5as3y9d5kib0bpyv7aiaqaa1-impure-nvidia-version-file.drv'...
these 3 derivations will be built:
  /nix/store/06jd6sjb0p2m8l2xfjaz8l05cqx6g2as-nvidia-x11-530.41.03-nixGL.drv
  /nix/store/4jiiwg3w5wxhj14mw6h6c9n165mlma25-nixGLNvidia-530.41.03.drv
  /nix/store/v3f80kddgv7yaph25vwgznmaspf29xfh-nixGL.drv
building '/nix/store/06jd6sjb0p2m8l2xfjaz8l05cqx6g2as-nvidia-x11-530.41.03-nixGL.drv'...
unpacking sources
Creating directory NVIDIA-Linux-x86_64-530.41.03
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 530.41.03/nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 729: /build/makeself.rwMjXbJe/zstd: No such file or directory
/nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 720: /dev/tty: No such device or address

Terminated
xz: (stdin): File format not recognized
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
error: builder for '/nix/store/06jd6sjb0p2m8l2xfjaz8l05cqx6g2as-nvidia-x11-530.41.03-nixGL.drv' failed with exit code 2
error: 1 dependencies of derivation '/nix/store/4jiiwg3w5wxhj14mw6h6c9n165mlma25-nixGLNvidia-530.41.03.drv' failed to build
error: 1 dependencies of derivation '/nix/store/v3f80kddgv7yaph25vwgznmaspf29xfh-nixGL.drv' failed to build

my host nvidia driver is 530.41.03-1, nix 2.14-1

@blurgyy
Copy link
Contributor

blurgyy commented Mar 29, 2023

I also encountered this with nixGL c917918 on Arch, after the 530.41.03 upgrade:

$ nix log /nix/store/0ylgpj1qa2dam32kk1wmbkhs090763q4-nvidia-x11-530.41.03-nixGL.drv
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
tail: error writing 'standard output': Broken pipe
Creating directory NVIDIA-Linux-x86_64-530.41.03
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 530.41.03/nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 729: /build/makeself.JnUYrn8b/zstd: No such file or directory
tail: error writing 'standard output': Broken pipe
/nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 720: /dev/tty: No such device or address

Terminated
xz: (stdin): File format not recognized
tar: This does not look like a tar archive
tail: error writing 'standard output': Broken pipe
tar: Exiting with failure status due to previous errors

@blurgyy
Copy link
Contributor

blurgyy commented Mar 29, 2023

Turns out it's not a nixgl issue and has been fixed in nixpkgs: NixOS/nixpkgs#222762

If anybody uses a flake-based environment like me, here's how I fixed this: I added a input inputs.nixpkgs-with-nvidia-driver-fix.url = "github:nixos/nixpkgs/pull/222762/head"; to flake.nix, and used the below config.packageOverrides to override the linuxPackages in my devShell:

# ...
let
  pkgs = import nixpkgs {
    inherit system;
    config = {
      allowUnfree = true;
      cudaSupport = true;
      packageOverrides = pkgs: {
        linuxPackages = (import inputs.nixpkgs-with-nvidia-driver-fix {}).linuxPackages;
      };
    };
    overlays = [
      inputs.nixgl.overlays.default
      jaxOverlays
    ];
  };
in
# ...

Reference: https://stackoverflow.com/a/54135089/13482274

@FGiuliari
Copy link

I had the same issues until yesterday, seems they pushed the PR and it is now fixed.

@amfern
Copy link

amfern commented Jun 21, 2023

I am still the same issue, i am using ubuntu 22.04 with flakes.

sudo NIXPKGS_ALLOW_UNFREE=1 nix profile install --impure --show-trace github:guibou/nixGL#nixGLNvidia
error: builder for '/nix/store/xg6fkrij6pm4dkxghp6lnhlb5b4dk82g-nvidia-x11-530.41.03-nixGL.drv' failed with exit code 2;
       last 10 log lines:
       > unpacking sources
       > Creating directory NVIDIA-Linux-x86_64-530.41.03
       > Verifying archive integrity... OK
       > Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 530.41.03/nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 729: /build/makeself.Q
FYQMTWS/zstd: No such file or directory
       > /nix/store/di2va099dlad32771wznbk9pjl1b57pl-NVIDIA-Linux-x86_64-530.41.03.run: line 720: /dev/tty: No such device or address
       >
       > Terminated
       > xz: (stdin): File format not recognized
       > tar: This does not look like a tar archive
       > tar: Exiting with failure status due to previous errors
       For full logs, run 'nix log /nix/store/xg6fkrij6pm4dkxghp6lnhlb5b4dk82g-nvidia-x11-530.41.03-nixGL.drv'.
error: 1 dependencies of derivation '/nix/store/cpx61md1wgh926qvljijalsyjlkny1nj-nixGLNvidia-530.41.03.drv' failed to build

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

No branches or pull requests

4 participants