conways-game-of-life/flake.nix

59 lines
1.5 KiB
Nix
Raw Normal View History

2021-12-20 00:58:35 -05:00
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: CC0-1.0
{
description = "My haskell application";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
};
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 = "conways-game-of-life";
2021-12-28 22:55:42 -05:00
execName = "gol";
2021-12-20 00:58:35 -05:00
in {
packages.${packageName} =
haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
};
defaultPackage = self.packages.${system}.${packageName};
2021-12-28 22:55:42 -05:00
apps.${execName} = {
type = "app";
program = "${self.packages.${system}.${packageName}}/bin/${execName}";
};
defaultApp = self.apps.${system}.${execName};
2021-12-20 00:58:35 -05:00
devShell = pkgs.mkShell {
buildInputs = with haskellPackages; [
2022-01-11 23:41:18 -05:00
ghc
2021-12-20 00:58:35 -05:00
cabal-install
hlint
2021-12-20 14:30:23 -05:00
pkgs.haskell-language-server
pkgs.ormolu
2021-12-26 20:41:28 -05:00
pkgs.mesa
pkgs.mesa_glu
pkgs.freeglut
2021-12-20 00:58:35 -05:00
];
inputsFrom = builtins.attrValues self.packages.${system};
};
});
}