Add nixGLCommon

This commit is contained in:
Guillaume Bouchard 2018-06-30 13:10:42 +02:00
parent 21764c9926
commit df9d0ecc16
2 changed files with 18 additions and 0 deletions

View File

@ -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"

View File

@ -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";
'';
}