52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{
|
|
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 {
|
|
inherit name;
|
|
|
|
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
|
|
LD_LIBRARY_PATH = with pkgs; "${glfw}/lib:${vulkan-loader}/lib:${vulkan-validation-layers}/lib";
|
|
VULKAN_SDK = with pkgs; "${vulkan-headers}";
|
|
VK_LAYER_PATH = with pkgs; "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
|
|
PTK_LOG_LEVEL = "debug";
|
|
};
|
|
in {
|
|
"${name}" = shell;
|
|
default = shell;
|
|
}
|
|
);
|
|
packages = forEachSystem (
|
|
system: let
|
|
pkgs = pkgsForEach.${system};
|
|
package = pkgs.callPackage ./default.nix {};
|
|
in {
|
|
"${name}" = package;
|
|
default = package;
|
|
}
|
|
);
|
|
};
|
|
}
|