matrix-media-expanded/flake.nix
2021-11-29 12:53:23 -05:00

47 lines
1.5 KiB
Nix

{
description = "haskell-template's description";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/7dcd2f54b82826b05cfd91730a1d77b5d80f008c";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ] (system:
let
overlays = [ ];
pkgs =
import nixpkgs { inherit system overlays; config.allowBroken = true; };
project = returnShellEnv:
pkgs.haskellPackages.developPackage {
inherit returnShellEnv;
name = "haskell-template";
root = ./.;
withHoogle = false;
overrides = self: super: with pkgs.haskell.lib; {
# Use callCabal2nix to override Haskell dependencies here
# cf. https://tek.brick.do/K3VXJd8mEKO7
};
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
# Specify your build/dev dependencies here.
cabal-fmt
cabal-install
ghcid
haskell-language-server
ormolu
pkgs.nixpkgs-fmt
]);
};
in
{
# Used by `nix build` & `nix run` (prod exe)
defaultPackage = project false;
# Used by `nix develop` (dev shell)
devShell = project true;
});
}