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};
|
|
|
|
|
2023-08-24 01:51:18 +00:00
|
|
|
nixos-lib = import (nixpkgs + "/nixos/lib") {};
|
|
|
|
|
2023-08-24 17:47:13 +00:00
|
|
|
haskellPackages = pkgs.haskellPackages.override (old: {
|
2023-08-24 15:01:49 +00:00
|
|
|
overrides = final: prev: {
|
|
|
|
wavefront = jailbreakUnbreak prev.wavefront;
|
2023-08-24 17:47:13 +00:00
|
|
|
vulkan-tutorial = vulkan-tutorial;
|
2023-08-24 15:01:49 +00:00
|
|
|
};
|
2023-08-24 17:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
vulkan-tutorial = # (ref:haskell-package-def)
|
|
|
|
haskellPackages.callCabal2nix packageName self {
|
|
|
|
# Dependency overrides go here
|
|
|
|
#wavefront = jailbreakUnbreak haskellPackages.wavefront;
|
2023-08-24 15:01:49 +00:00
|
|
|
};
|
2022-12-01 12:18:38 +00:00
|
|
|
|
|
|
|
jailbreakUnbreak = pkg:
|
2023-08-24 17:47:13 +00:00
|
|
|
pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.markUnbroken pkg);
|
2022-12-01 12:18:38 +00:00
|
|
|
|
|
|
|
packageName = "vulkan-tutorial";
|
2022-12-02 01:57:30 +00:00
|
|
|
in rec {
|
2023-08-24 17:51:25 +00:00
|
|
|
packages.default = haskellPackages.vulkan-tutorial;
|
2023-08-24 01:51:18 +00:00
|
|
|
|
2023-08-24 17:47:13 +00:00
|
|
|
devShells.default = haskellPackages.shellFor {
|
|
|
|
packages = p: [ p.vulkan-tutorial ];
|
2022-12-02 01:57:30 +00:00
|
|
|
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
|
2023-01-26 05:46:55 +00:00
|
|
|
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
|
|
|
};
|
2023-08-24 01:58:29 +00:00
|
|
|
});
|
2022-12-01 12:18:38 +00:00
|
|
|
}
|
|
|
|
|