From df9d0ecc162f397628eb04dd24978e77972a70e3 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Sat, 30 Jun 2018 13:10:42 +0200 Subject: [PATCH] Add nixGLCommon --- README.md | 9 +++++++++ default.nix | 9 +++++++++ 2 files changed, 18 insertions(+) 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"; + ''; }