NixGL [ref]

Tags:  CCE Project

NixGL builds little wrapper programs which use the system libGL or nvidia libraries to run nixpkgs/home-manager programs which need OpenGL or whatever. Since it lives outside of home-manger, it's managed with Ansible:

- name: nixgl cloned
  git:
    repo: https://github.com/guibou/nixGL
    dest: ~/Code/nixGL
    version: master
  become: yes
  become_user: "{{local_account}}"
  tags:
  - nixgl
  register: nixgl_git

- name: build nixglintel
  shell: nix-env -f ~/Code/nixGL -iA nixGLIntel
  when: nixgl_git.changed
  become: yes
  become_user: "{{local_account}}"
  tags:
  - nixgl

- name: build nixglintel
  shell: nix-env -f ~/Code/nixGL -iA nixVulkanIntel
  when: nixgl_git.changed
  become: yes
  become_user: "{{local_account}}"
  tags:
  - nixgl

nixGL Wrapper helper

This plugs in to CCE Hypermedia to make it somewhat more durable to create functional wrappers for nixGL:

{ pkgs, lib, stdenv, ... }:

{ name, package_name ? name }:
let
  nixGLgh = pkgs.fetchFromGitHub {
    rev = "7d6bc1b21316bab6cf4a6520c2639a11c25a220e";
    owner = "guibou";
    repo = "nixGL";
    sha256 = "02y38zmdplk7a9ihsxvnrzhhv7324mmf5g8hmxqizaid5k5ydpr3";
  };
  nixGL = (pkgs.callPackage nixGLgh {}).nixGLIntel;
  pkg_to_shadow = pkgs."${package_name}";
in
pkgs.symlinkJoin {
  inherit name;
  paths = [
    (pkgs.writeScriptBin name ''
       #!${pkgs.stdenv.shell}
       exec ${nixGL}/bin/nixGLIntel ${pkg_to_shadow}/bin/${name} $@
     '')
    pkg_to_shadow
  ];
}

NEXT mark this for tangling in home-manager somehow…


This is Referenced

''

in "Picom on EXWM startup"

in "PrintrBot Simple Metal"

in "The Complete Computing Environment"

in "Applications I Use"