2024-08-08 14:38:43 +02:00
|
|
|
{
|
|
|
|
description = "poz toolkit";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {self, nixpkgs, ...}: let
|
|
|
|
name = "ptk";
|
|
|
|
|
|
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
|
|
|
forEachSystem = nixpkgs.lib.genAttrs systems;
|
|
|
|
pkgsForEach = nixpkgs.legacyPackages;
|
|
|
|
in {
|
|
|
|
devShells = forEachSystem (
|
|
|
|
system: let
|
|
|
|
pkgs = pkgsForEach.${system};
|
|
|
|
shell = pkgs.mkShell {
|
2024-08-08 15:08:51 +02:00
|
|
|
inherit name;
|
2024-08-08 14:38:43 +02:00
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
bear
|
|
|
|
gdb
|
|
|
|
vulkan-tools
|
|
|
|
spirv-tools
|
|
|
|
mesa-demos
|
|
|
|
];
|
|
|
|
|
|
|
|
inputsFrom = [ self.packages.${system}.default ];
|
|
|
|
|
|
|
|
# https://discourse.nixos.org/t/setting-up-vulkan-for-development/11715/3
|
2024-08-13 01:28:42 +02:00
|
|
|
LD_LIBRARY_PATH = with pkgs; "${glfw}/lib:${vulkan-loader}/lib:${vulkan-validation-layers}/lib:./target";
|
2024-08-08 14:38:43 +02:00
|
|
|
VULKAN_SDK = with pkgs; "${vulkan-headers}";
|
|
|
|
VK_LAYER_PATH = with pkgs; "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
|
2024-08-09 12:50:07 +02:00
|
|
|
PTK_LOG_LEVEL = "debug";
|
2024-08-08 14:38:43 +02:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
"${name}" = shell;
|
|
|
|
default = shell;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
packages = forEachSystem (
|
|
|
|
system: let
|
|
|
|
pkgs = pkgsForEach.${system};
|
2024-08-08 14:47:55 +02:00
|
|
|
package = pkgs.callPackage ./default.nix {};
|
2024-08-08 14:38:43 +02:00
|
|
|
in {
|
|
|
|
"${name}" = package;
|
|
|
|
default = package;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|