Fixes + Refactor
This commit is contained in:
parent
2dee61f8e0
commit
9f713edf62
17 changed files with 206 additions and 93 deletions
35
flake.nix
35
flake.nix
|
@ -4,26 +4,39 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixgl = {
|
||||
# Revert this to community version when https://github.com/nix-community/nixGL/pull/187 is merged
|
||||
url = "github:phirsch/nixGL/fix-versionMatch";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
outputs = { nixpkgs, flake-utils, nixgl, ... }:
|
||||
flake-utils.lib.eachSystem flake-utils.lib.allSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
overlays = [ nixgl.overlay ];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [ vulkan-headers vulkan-loader vulkan-validation-layers renderdoc ];
|
||||
|
||||
mkCustomShell = { extraPkgs ? [] }: pkgs.mkShell {
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d:${pkgs.renderdoc}/share/vulkan/implicit_layer.d";
|
||||
|
||||
packages = with pkgs; [
|
||||
jdk22
|
||||
maven
|
||||
] ++ extraPkgs;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d:${pkgs.renderdoc}/share/vulkan/implicit_layer.d";
|
||||
|
||||
packages = with pkgs; [
|
||||
jdk22
|
||||
maven
|
||||
];
|
||||
};
|
||||
default = mkCustomShell { extraPkgs = [ pkgs.nixgl.auto.nixVulkanNvidia pkgs.nixgl.nixVulkanMesa ]; };
|
||||
nixos = mkCustomShell {};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue