vulkan-tutorial/flake.nix

63 lines
1.8 KiB
Nix
Raw Normal View History

2022-12-01 12:18:38 +00:00
{
description = "A game stub written in Haskell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
haskellPackages = pkgs.haskellPackages;
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
packageName = "vulkan-tutorial";
2022-12-02 01:57:30 +00:00
in rec {
2022-12-01 12:18:38 +00:00
packages.${packageName} = # (ref:haskell-package-def)
haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
2022-12-15 04:19:53 +00:00
wavefront = jailbreakUnbreak haskellPackages.wavefront;
2022-12-01 12:18:38 +00:00
};
defaultPackage = self.packages.${system}.${packageName};
2022-12-02 01:57:30 +00:00
devShell = haskellPackages.shellFor {
packages = p: [ defaultPackage ];
withHoogle = true;
2022-12-02 09:09:01 +00:00
buildInputs = (with haskellPackages; [
2022-12-01 12:18:38 +00:00
haskell-language-server
ghcid
cabal-install
2022-12-02 09:09:01 +00:00
]) ++ (with pkgs; [
shaderc
vulkan-loader
vulkan-validation-layers
2023-04-02 11:46:38 +00:00
renderdoc
2022-12-02 09:09:01 +00:00
]);
2023-04-07 23:55:11 +00:00
VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
SDL_VULKAN_LIBRARY="${pkgs.vulkan-loader}/lib/libvulkan.so";
2022-12-01 12:18:38 +00:00
};
2022-12-02 01:57:30 +00:00
#devShell = pkgs.mkShell {
# buildInputs = with haskellPackages; [
# haskell-language-server
# ghcid
# cabal-install
# ];
# nativeBuildInputs = with pkgs; [
# pkg-config
# SDL2
# vulkan-validation-layers
# vulkan-headers
# vulkan-loader
# ];
# inputsFrom = builtins.attrValues self.packages.${system};
#};
2022-12-01 12:18:38 +00:00
});
}