mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 04:33:11 +00:00
nixgl: Improve option documentation
This commit is contained in:
parent
7dee0dc8f0
commit
e61f87969a
1 changed files with 23 additions and 6 deletions
|
@ -10,12 +10,28 @@ in {
|
||||||
example = lib.literalExpression
|
example = lib.literalExpression
|
||||||
''"''${inputs.nixGL.packages.x86_64-linux.nixGLIntel}/bin/nixGLIntel"'';
|
''"''${inputs.nixGL.packages.x86_64-linux.nixGLIntel}/bin/nixGLIntel"'';
|
||||||
description = ''
|
description = ''
|
||||||
The nixGL command that `lib.nixGL.wrap` should wrap packages with.
|
The [nixGL](https://github.com/nix-community/nixGL) command that `lib.nixGL.wrap` should prefix
|
||||||
This can be used to provide libGL access to applications on non-NixOS systems.
|
package binaries with. nixGL provides your system's version of libGL to applications, enabling
|
||||||
|
them to access the GPU on non-NixOS systems.
|
||||||
|
|
||||||
Wrap individual packages like so: `(config.lib.nixGL.wrap <package>)`. The returned package
|
Wrap individual packages which require GPU access with the function like so: `(config.lib.nixGL.wrap <package>)`.
|
||||||
can be used just like the original one, but will have access to libGL. If this option is empty (the default),
|
The returned package can be used just like the original one, but will have access to libGL. For example:
|
||||||
then `lib.nixGL.wrap` is a no-op. This is useful on NixOS, where the wrappers are unnecessary.
|
|
||||||
|
```nix
|
||||||
|
# If you're using a Home Manager module to configure the package,
|
||||||
|
# pass it into the module's package argument:
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
package = (config.lib.nixGL.wrap pkgs.kitty);
|
||||||
|
};
|
||||||
|
|
||||||
|
# Otherwise, pass it to any option where a package is expected:
|
||||||
|
home.packages = [ (config.lib.nixGL.wrap pkgs.hello) ];
|
||||||
|
```
|
||||||
|
|
||||||
|
If this option is empty (the default), then `lib.nixGL.wrap` is a no-op. This is useful for sharing your Home Manager
|
||||||
|
configurations between NixOS and non-NixOS systems, since NixOS already provides libGL to applications without the
|
||||||
|
need for nixGL.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +51,8 @@ in {
|
||||||
# a new debug output to be produced. We won't be producing any debug info
|
# a new debug output to be produced. We won't be producing any debug info
|
||||||
# for the original package.
|
# for the original package.
|
||||||
separateDebugInfo = false;
|
separateDebugInfo = false;
|
||||||
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.makeWrapper ];
|
nativeBuildInputs = old.nativeBuildInputs or [ ]
|
||||||
|
++ [ pkgs.makeWrapper ];
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue