diff --git a/README.md b/README.md index ac446e4..1094899 100644 --- a/README.md +++ b/README.md @@ -180,3 +180,12 @@ If by any chance it does not work, you need to install nixGL using the same nixp ```bash NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/94d80eb72474bf8243b841058ce45eac2b163943.tar.gz nix build -f ./default.nix nixGLIntel ``` + +# `nixGLCommon` + +`nixGLCommon nixGLXXX` can be used to get `nixGL` executable which fallsback to `nixGLXXX`. It is a shorter name for people with only one OpenGL configuration. + +For example: + +``` +nix-build -E "with import ./default.nix {}; nixGLCommon nixGLIntel" diff --git a/default.nix b/default.nix index 80e1f20..e8a62f3 100644 --- a/default.nix +++ b/default.nix @@ -103,4 +103,13 @@ rec { chmod u+x "$out/bin/nixVulkanIntel" ${shellcheck}/bin/shellcheck "$out/bin/nixVulkanIntel" ''; + + nixGLCommon = nixGL: + runCommand "nixGLCommon" { + buildInuts = [nixGL]; + } + '' + mkdir -p "$out/bin" + cp "${nixGL}/bin/${nixGL.name}" "$out/bin/nixGL"; + ''; }