Add support for "nix run"
This commit is contained in:
parent
d323ca2988
commit
3cdb121ed3
|
@ -6,7 +6,7 @@ license: MIT
|
|||
build-type: Simple
|
||||
cabal-version: >= 1.8
|
||||
|
||||
executable main
|
||||
executable gol
|
||||
main-is: Main.hs
|
||||
other-modules: GOL.Rule,
|
||||
GOL.Space,
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -23,8 +23,9 @@
|
|||
jailbreakUnbreak = pkg:
|
||||
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
||||
|
||||
# DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw`
|
||||
packageName = "conways-game-of-life";
|
||||
|
||||
execName = "gol";
|
||||
in {
|
||||
packages.${packageName} =
|
||||
haskellPackages.callCabal2nix packageName self rec {
|
||||
|
@ -33,6 +34,13 @@
|
|||
|
||||
defaultPackage = self.packages.${system}.${packageName};
|
||||
|
||||
apps.${execName} = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.${packageName}}/bin/${execName}";
|
||||
};
|
||||
|
||||
defaultApp = self.apps.${system}.${execName};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with haskellPackages; [
|
||||
ghcid
|
||||
|
|
Loading…
Reference in a new issue