From 9aa0b990a36716954ff30149982d1b5928cc3e57 Mon Sep 17 00:00:00 2001 From: edouardparis Date: Tue, 23 Apr 2024 14:28:43 +0200 Subject: [PATCH] Add nixGL to gui/shell.nix Nixos 23.11 comes with libc 2.38, this version of libc may not be compatible with some drivers. For now the hack found is to user a community wrapper that detects the requirements and do the link (https://github.com/guibou/nixGL). usage: nixGL cargo run --- gui/shell.nix | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/gui/shell.nix b/gui/shell.nix index 43b521b0b..2c19d6617 100644 --- a/gui/shell.nix +++ b/gui/shell.nix @@ -1,18 +1,27 @@ -{ pkgs ? import {} }: +# Nixos 23.11 comes with libc 2.38, this version of libc may not be compatible +# with some drivers. For now the hack found is to user a community wrapper that +# detects the requirements and do the link (https://github.com/guibou/nixGL). +# usage: +# nixGL cargo run +let + nixgl = import (fetchTarball "https://github.com/guibou/nixGL/archive/master.tar.gz") {}; + pkgs = import {}; +in pkgs.mkShell rec { - buildInputs = with pkgs; [ - expat - fontconfig - freetype - freetype.dev - libGL - pkgconfig - udev - xorg.libX11 - xorg.libXcursor - xorg.libXi - xorg.libXrandr + buildInputs = [ + pkgs.expat + pkgs.fontconfig + pkgs.freetype + pkgs.freetype.dev + pkgs.libGL + pkgs.pkgconfig + pkgs.udev + pkgs.xorg.libX11 + pkgs.xorg.libXcursor + pkgs.xorg.libXi + pkgs.xorg.libXrandr + nixgl.auto.nixGLDefault ]; LD_LIBRARY_PATH =