54 lines
1.6 KiB
Nix
54 lines
1.6 KiB
Nix
{
|
|
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 = "affection";
|
|
in rec {
|
|
packages.${packageName} = # (ref:haskell-package-def)
|
|
haskellPackages.callCabal2nixWithOptions packageName self "--flag examples" {
|
|
# Dependency overrides go here
|
|
};
|
|
|
|
defaultPackage = self.packages.${system}.${packageName};
|
|
|
|
apps = {
|
|
example00 = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.${packageName}}/bin/example00";
|
|
};
|
|
example01 = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.${packageName}}/bin/example01";
|
|
};
|
|
example02 = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.${packageName}}/bin/example02";
|
|
};
|
|
};
|
|
|
|
devShell = haskellPackages.shellFor {
|
|
packages = p: [ defaultPackage ];
|
|
withHoogle = true;
|
|
buildInputs = with haskellPackages; [
|
|
haskell-language-server
|
|
ghcid
|
|
cabal-install
|
|
] ++ (builtins.attrValues self.packages.${system});
|
|
};
|
|
});
|
|
}
|
|
|