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
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
]);
|
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
|
|
|
});
|
|
|
|
}
|
|
|
|
|