45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
|
# 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
|
||
|
];
|
||
|
inputsFrom = builtins.attrValues self.packages.${system};
|
||
|
};
|
||
|
});
|
||
|
}
|