53 lines
1.3 KiB
Nix
53 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 {
|
||
|
name = "ptk";
|
||
|
|
||
|
packages = with pkgs; [
|
||
|
bear
|
||
|
gdb
|
||
|
vulkan-tools
|
||
|
shaderc
|
||
|
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:./target";
|
||
|
VULKAN_SDK = with pkgs; "${vulkan-headers}";
|
||
|
VK_LAYER_PATH = with pkgs; "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
|
||
|
};
|
||
|
in {
|
||
|
"${name}" = shell;
|
||
|
default = shell;
|
||
|
}
|
||
|
);
|
||
|
packages = forEachSystem (
|
||
|
system: let
|
||
|
pkgs = pkgsForEach.${system};
|
||
|
package = pkgs.callPackage ./nix/default.nix {};
|
||
|
in {
|
||
|
"${name}" = package;
|
||
|
default = package;
|
||
|
}
|
||
|
);
|
||
|
};
|
||
|
}
|