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 = { }; }));
|
|
|
|
|
|
|
|
# DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw`
|
|
|
|
packageName = "conways-game-of-life";
|
|
|
|
in {
|
|
|
|
packages.${packageName} =
|
|
|
|
haskellPackages.callCabal2nix packageName self rec {
|
|
|
|
# Dependency overrides go here
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultPackage = self.packages.${system}.${packageName};
|
|
|
|
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
buildInputs = with haskellPackages; [
|
|
|
|
ghcid
|
|
|
|
cabal-install
|
|
|
|
hlint
|
2021-12-20 14:30:23 -05:00
|
|
|
pkgs.haskell-language-server
|
|
|
|
pkgs.ormolu
|
2021-12-20 00:58:35 -05:00
|
|
|
];
|
|
|
|
inputsFrom = builtins.attrValues self.packages.${system};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|