mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
nixos/renderdoc: Init module
This commit is contained in:
@@ -46,6 +46,8 @@
|
||||
|
||||
- [scx_loader](https://github.com/sched-ext/scx-loader), a system daemon and DBus-based loader for sched_ext schedulers. `scxctl` is the command-line client for interacting with the loader, allowing users to switch schedulers, modes, and arguments dynamically. Available as [services.scx-loader](#opt-services.scx-loader.enable)
|
||||
|
||||
- [Renderdoc](https://renderdoc.org/), a graphics debugger for Vulkan, D3D11, D3D12, OpenGL, and OpenGL ES. Available as [programs.renderdoc](#opt-programs.renderdoc.enable).
|
||||
|
||||
- [tap](https://github.com/bluesky-social/indigo/tree/main/cmd/tap), an ATProtocol firehose synchronisation utility. Available as [services.tap](#opt-services.tap.enable).
|
||||
|
||||
- [Nezha](https://github.com/nezhahq/nezha), a self-hosted, lightweight server and website monitoring and O&M tool. Available as [services.nezha](#opt-services.nezha.enable).
|
||||
|
||||
@@ -316,6 +316,7 @@
|
||||
./programs/qgroundcontrol.nix
|
||||
./programs/qt5ct.nix
|
||||
./programs/quark-goldleaf.nix
|
||||
./programs/renderdoc.nix
|
||||
./programs/rog-control-center.nix
|
||||
./programs/rush.nix
|
||||
./programs/rust-motd.nix
|
||||
|
||||
63
nixos/modules/programs/renderdoc.nix
Normal file
63
nixos/modules/programs/renderdoc.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.renderdoc;
|
||||
hasVulkanLayers = cfg.package ? passthru.vulkanLayers;
|
||||
layerDir = "${cfg.package}/share/vulkan/implicit_layer.d";
|
||||
in
|
||||
{
|
||||
options.programs.renderdoc = {
|
||||
enable = lib.mkEnableOption "RenderDoc a frame-capture based graphics debugger";
|
||||
|
||||
package = lib.mkPackageOption pkgs "renderdoc" {
|
||||
example = "renderdoc";
|
||||
};
|
||||
|
||||
installVulkanLayer = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Installs the Vulkan layer for RenderDoc,
|
||||
which is required for Vulkan applications to be captured.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.installVulkanLayer -> hasVulkanLayers;
|
||||
message = ''
|
||||
programs.renderdoc.package (${
|
||||
cfg.package.name or "renderdoc"
|
||||
}) does not expose `passthru.vulkanLayers`,
|
||||
which is required to install the Vulkan implicit layer manifest(s) to /etc/vulkan/implicit_layer.d.
|
||||
Either use the upstream `renderdoc` package, add `passthru.vulkanLayers` to your override,
|
||||
or set `programs.renderdoc.installVulkanLayer = false;`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.etc = lib.mkIf (cfg.installVulkanLayer && hasVulkanLayers) (
|
||||
lib.listToAttrs (
|
||||
map (name: {
|
||||
name = "vulkan/implicit_layer.d/${name}";
|
||||
value = {
|
||||
source = "${layerDir}/${name}";
|
||||
};
|
||||
}) cfg.package.passthru.vulkanLayers
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
ShyAssassin
|
||||
pbsds
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user